Pixel Dev
Pixel Dev

Reputation: 37

HyperLink in XAML Windows Phone

Hi i am new Windows Phone XAML,i dont know how to use HyerLink

Here is My Code,

i need a HyerLink for the this Text,

  <Grid HorizontalAlignment="Left" Width="100"  VerticalAlignment="Top" Margin="120,160,0,0">
                <TextBlock  Width="Auto" Foreground="Black" FontSize="15" >Where To Stay</TextBlock>
            </Grid>

but when i used the below code error occurs,

<Grid HorizontalAlignment="Left" Width="100"  VerticalAlignment="Top" Margin="120,160,0,0">
                <TextBlock  Width="Auto" Foreground="Black" FontSize="15" ><Hyperlink Click="Stay_Click">Where To Stay</Hyperlink></TextBlock>
            </Grid>

Please give me any solution

Upvotes: 1

Views: 73

Answers (1)

KarthikManoharan
KarthikManoharan

Reputation: 805

Why you simply use this,

<HyperlinkButton Width="Auto" Foreground="Black" FontSize="15" Click="Stay_Click">Where To Stay</HyperlinkButton>

Upvotes: 1

Related Questions