从Windows应用商店应用中删除超链接下划线

前端之家收集整理的这篇文章主要介绍了从Windows应用商店应用中删除超链接下划线前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用Xaml和C#为 Windows Phone 8.1和Windows 8.1创建通用的Windows运行时应用程序.

我有内联超链接设置如此 – @H_404_2@

<TextBlock Width="400" TextWrapping="Wrap">
    <Span FontSize="20">
        This is an example of how Hyperlink can be used in a paragraph of text. It might be helpful for you look to
        <Hyperlink NavigateUri="http://www.bing.com">bing</Hyperlink> 
        for more answers in the future.
    </Span>
</TextBlock>

这将显示带有下划线的文本,指示可点击的超链接.但是我想通过颜色指示超链接而不是下划线,因为我可以在TextBlock中有多个超链接.@H_404_2@

我想从内联超链接删除下划线 – 在WP 8.1和Windows 8.1 Store应用程序中不再存在TextDecorations属性.@H_404_2@

注意*我使用的是Hyperlink元素而不是HyperlinkBut​​ton,因为我需要将链接与文本内联.@H_404_2@

我会写评论,但我的声誉还不足以做到这一点.

我尝试了相同的代码,空白赢得8.1和赢得手机8.1项目.但是,默认情况下,超链接显示为颜色,而不是与项目相对的下划线.我的代码如下@H_404_2@

<TextBlock Width="400" TextWrapping="Wrap">
        <Span FontSize="20">
            This is an example of how Hyperlink can be used in a paragraph of text. It might be helpful for you look to
            <Hyperlink NavigateUri="http://www.bing.com" Foreground="#FF0007FF">bing</Hyperlink> 
            for more answers in the future.
        </Span>
    </TextBlock>

你能试试Foreground的房产吗?也许它会帮助你.@H_404_2@

原文链接:https://www.f2er.com/windows/364489.html

猜你在找的Windows相关文章