How to navigate without HyperlinkButton beatween two pages? - silverlight

I created two pages on my scratch silverlight application.
The two pages are appear on the mainPage ( mainPage is a UserControl ).
Now, i want to see the page1 on the top and navigate to page2.
I can't add HyperlinkButton.
How can i add the page 2 ?
And how can i navigate to page2 from page 1 ( can be from the mainPage that contain the page1 & page2 )
I try evrything and nothing work.
The code
<navigation:Frame x:Name="FrameNavigator" Source="/Views/page1.xaml" >
// need somehow to add here page2
</navigation:Frame>

Are you trying to show both pages at once? And why do you not want to us a Hyperlink button. If you want the user to be able to click on something and go to page2, but you don't want it to look like a HyperlinkButton, you can replace the Content of the HyperlinkButton.
<HyperlinkButton.Content>
<Image ... /> <!-- or whatever --/>
</HyperlinkButton.Content>
If for whatever reason you don't want to use HyperlinkButton, you can navigate from code.
FrameNavigator.Navigate(uri);
Please be more specific as to what you are trying to do and I can give a better answer.

Thanks,
I solve this problem in this way
Frame2.Navigate(new Uri("/Page1.xaml", UriKind.Relative));

Use Button Control for this
On click event you can navigate page in frameby
NavigationFrame.Navigate(uri)
try this

NavigationService.Navigate(new Uri("/MissionsPage.xaml", UriKind.Relative));
I am new to xaml and am just now starting to realize the design capabilitys so I do everything else in the code behind just make sure you have
using System.Windows.Navigation

Related

How to switch a tab menue on button click in react.js

I have a component of header in react and in the same way a component of tabs in another file. I integrate them in app.js . Now I want to change the tabs on click of the header buttons. How could it been possible can anyone help me in this regard.
I have tried it through giving an ID to the tabs and tried to open the tab by calling that ID in href using anchor tag around the tab buttons. But this way can't help me in to open tabs.
https://codesandbox.io/embed/shy-grass-l9n7m
I noticed you are using jQuery to set the tab value. I suggest using React for that with something more like this: https://codesandbox.io/embed/morning-water-dit63
Note: The above code is very rough because I just through it together by modifying your code. For example, I used the active and fade class names to set the visibility of tab content where personally I might have done conditional rendering like this:
render (
// tabs
{this.isActive('home') && (
// tab content here
)}
)
Alternatively you could use a library to handle it like https://reactcommunity.org/react-tabs/

ExtJS Change Button UI

Using ExtJS5 I want my toolbar buttons to look like the normal ExtJS buttons. In the documentation I see the CSS Mixins but I am not putting things together. Can someone give me a kick in the right direction? Thanks.
Use defaultButtonUI in your toolbar:
defaultButtonUI : 'default'
See documentation of defaultButtonUI:
A default ui to use for Button items. This is a quick and simple way
to change the look of all child Buttons.
If there is no value for defaultButtonUI, the button's ui value will
get -toolbar appended so the Button has a different look when it's a
child of a Toolbar.
See https://fiddle.sencha.com/#fiddle/jpo

How to stay in and change the current Silverlight URL window

In regards to this question:
<HyperlinkButton NavigateUri="http://www.microsoft.com" Content="Go to Microsoft" TargetName="_blank"/>
This opens a new window or tab to a external URL. The External URL navigation is correct, but how can we stay in the same window and tab?
if using HyperLinkButton, set TargetName to "_self" will open link in current page.
Answer from:
http://social.msdn.microsoft.com/Forums/en-US/silverlightdevtools/thread/250d546a-3237-4f7d-a146-b31e58191adf/

How to make a window modal to Page in WPF?

I know how to make a Window Modal to a Window
I have a Page as my main window. I want to open a window and make it Modal to the Page. Is it possible? Does Page class have API's to support my requirement? If yes a sample illustration will be nice!!
This is very simple (unless I've misunderstood your issue)
Window win = new MainWindow();
win.ShowDialog();
These links may help:
http://social.msdn.microsoft.com/Forums/en/windowsgeneraldevelopmentissues/thread/3c3e1a4a-6b26-435c-b59b-2e2f1766f52d
Link
​​​

Free control - Hybrid LinkLabel and HtmlTextBlock for Silverlight 3

I need a simple HTML renderer ( like HtmlTexBlock ) which also allows to intercept click on custom defined link ( like LinkLabel ) looking like hyperlink. Does anything like that exist as free software ?
I don't know of any but if you only want one link in your html text could you maybe template a button using the htmltextblock as the content and capture the click event and navigate to desired page. I know it will not work if you have multiple links in your html text however it is unclear what your exact requirment is.
eg.
<Button x:Name="btnhtml" Width="63" >
<htmltextblock Text="Hello World"></htmltextblock>
</Button>

Resources