WPF 实现超链接

2024-01-13  本文已影响0人  idengwei
<TextBlock>
    <Hyperlink NavigateUri="https://gitee.com/idengwei" Click="Hyperlink_Click">
        https://gitee.com/idengwei
    </Hyperlink>
</TextBlock>
private void Hyperlink_Click(object sender, RoutedEventArgs e)
{
    Process.Start((sender as Hyperlink).NavigateUri.AbsoluteUri);
}
上一篇下一篇

猜你喜欢

热点阅读