Sunday, December 9, 2012

Image hyperlink clickable

In XAML:


<Image Height="127" HorizontalAlignment="Left" Margin="31,476,0,0" Name="image1"  Stretch="Fill" VerticalAlignment="Top" Width="396" Source="/img/banner2.png" Grid.ColumnSpan="2">
                        <toolkit:GestureService.GestureListener>
                            <toolkit:GestureListener Tap="GestureListener_Tap_1"/>
                        </toolkit:GestureService.GestureListener>
                    </Image>

In Coding:


private void GestureListener_Tap_1(object sender, Microsoft.Phone.Controls.GestureEventArgs e)
        {
            WebBrowserTask wbt = new WebBrowserTask();
            wbt.Uri = new Uri("http://www.khmertype.org", UriKind.Absolute);
            wbt.Show();

        }

No comments:

Post a Comment