wpf添加超链接

前段:

<TextBlock Margin="69,93,859,10">
            <Hyperlink NavigateUri="http://dmsite.chinacloudsites.cn" Name="linkHelp" Click="linkDmsite_Click">
                个人小站   
            </Hyperlink>
            </TextBlock>

后端:

 private void linkDmsite_Click(object sender, RoutedEventArgs e)
        {
            Hyperlink link = sender as Hyperlink;
            Process.Start(new ProcessStartInfo(link.NavigateUri.AbsoluteUri));
        }

 

posted @ 2016-11-09 11:17  晓明的哥哥  阅读(2564)  评论(2编辑  收藏  举报