Search

Monday, April 6, 2015
0 comments

Example of Hyperlink control in windows store app Tutorial

11:11 PMMonday, April 6, 2015

How to Navigate from page to specific URL

 Add HyperlinkButton control with specified code , code is

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

        <HyperlinkButton FontSize=" 30" Content="Google.com" NavigateUri=" http://www.google.com" Margin="272,218,0,475" Height="75" />

    </Grid>

This code add into MainPage.xaml file
Code generate the following output
windows store How to Navigate from page to specific URLwindows store How to Navigate from page to specific URL


How to Navigate from one page to another page in windows store app tutorial

Add click event handler with HyperLinkButton control look like

Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

        <HyperlinkButton Click="HyperlinkButton_Click" FontSize=" 30" Content="Move to Next page"  Margin="272,218,0,475" Height="75" />

    </Grid>
Add Handler code in MainPage.xaml.cs file

  private void HyperlinkButton_Click(object sender, RoutedEventArgs e)
        {
            this.Frame.Navigate(typeof(secondpage));

        }
Code Generate the following output
How to Navigate from one page to another page in windows store app tutorial

How to Navigate from one page to another page in windows store app tutorial

Protected by Copyscape Online Copyright Protection Software

0 comments :

Post a Comment

 
Toggle Footer
Top