Windows 8.1 新增控件之 Hyperlink
Hyperlink 控件应该不用过多介绍大家肯定十分清楚其作用,它的功能就像HTML中的<a href=””>标签一样,只不过是在XAML中实现。
使用Hyperlink 标记的文字在应用中会以特殊颜色显示,当用户点击或触碰该文字时就会自动转到NavigateUri 指向的地址链接。如下代码所示:
<TextBlock FontSize="50" FontWeight="Bold">Getting started tutorials for Windows</TextBlock>
<TextBlock FontSize="25" FontWeight="Bold">New to Windows 8.1 or Windows RT 8.1?</TextBlock>
<RichTextBlock FontSize="30" Width="800" HorizontalAlignment="Left">
<Paragraph>
You're at the right place. Whether you're brand new to Windows 8.1 or Windows RT 8.1,
or just want a refresher,
<Hyperlink NavigateUri="http://windows.microsoft.com/en-us/windows/how-to?ocid=GA8-1_O_WOL_Hero_Home_HowTo_Pos2_01">
these 10 tutorials will show you the basics.</Hyperlink>
</Paragraph>
</RichTextBlock>
我们把段落中一句文字用NavigateUri 指向特定网站链接,链接颜色默认显示为紫色,可以用Foreground 属性调整颜色。

点击Hyperlink 后应用会打开网页,如下图所示:

关于Hyperlink 的其他属性可参考:
http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.documents.hyperlink.aspx
Windows 8.1 新增控件之 Hyperlink的更多相关文章
- 重新想象 Windows 8.1 Store Apps (75) - 新增控件: Hub, Hyperlink
[源码下载] 重新想象 Windows 8.1 Store Apps (75) - 新增控件: Hub, Hyperlink 作者:webabcd 介绍重新想象 Windows 8.1 Store A ...
- Windows 8.1 新增控件之 AppBar
Windows 8.1 与Windows 8 相比已经有了很多改进,从ITPro 角度这篇文章<What's New in Windows 8.1>已经表述的很详细.对开发者来说,最明显的 ...
- Windows 8.1 新增控件之 DatePicker
大年初一来介绍一个简单易用的DatePicker 控件,这个控件是新增的?印象里很早就有了啊,Anyway来看看Windows 8.1 里的DataPicker 有什么功能吧. 先来看看这个代码,很简 ...
- Windows 8.1 新增控件之 TimePicker
之前已经为大家介绍过DatePicker 控件的相关内容,有日期控件当然就得有时间控件,本篇将和各位一起了解TimePicker 的使用方法. 先来介绍一下ClockIdentifier 属性,默认情 ...
- Windows 8.1 新增控件之 MenuFlyout
开始这篇讲解前,我们先来温习一下Flyout 的内容,当触发应用中某个Button 时会有Flyout 出现提示用户该操作接下来将会发生什么.Flyout 简单来说就是一个轻量级信息提示需要用户确认或 ...
- Windows 8.1 新增控件之 Flyout
本篇为大家介绍Flyout 控件,Flyout 属于一种轻量级交互控件,可以支持信息提示或用户交互.与传统Dialog 控件不同的是Flyout 控件可通过直接点击对话框外部区域忽略. Flyout ...
- Windows 8.1 新增控件之 CommandBar
上一篇为大家介绍了AppBar 的相关内容,本篇继续介绍CommandBar 的使用方法.与AppBar 相比而言,CommandBar 在开发使用方面较为单一,在按键布局上分为主控区(Primary ...
- Windows 8.1 应用再出发 - 几种新增控件(1)
Windows 8.1 新增的一些控件,分别是:AppBar.CommandBar.DatePicker.TimePicker.Flyout.MenuFlyout.SettingsFlyout.Hub ...
- Windows 8.1 应用再出发 - 几种新增控件(2)
本篇我们接着来介绍Windows 8.1 的新增控件,分别是:Flyout.MenuFlyout.SettingsFlyout.Hub 和 Hyperlink. 1. Flyout Flyout被称为 ...
随机推荐
- nodejs 小爬虫
编写爬虫示例: var http = require('http'); var cheerio = require('cheerio'); var url = 'http://www.cnblogs. ...
- PHP导出数据库方法
(1)定义一个db_dump函数如下: <?PHP function db_dump($host,$user,$pwd,$db) { $mysqlconlink = mysql_connect( ...
- 跨域调用webapi web端跨域调用webapi
web端跨域调用webapi 在做Web开发中,常常会遇到跨域的问题,到目前为止,已经有非常多的跨域解决方案. 通过自己的研究以及在网上看了一些大神的博客,写了一个Demo 首先新建一个webap ...
- Asp.net MVC的Model Binder工作流程以及扩展方法(1) - Custom Model Binder
在Asp.net MVC中, Model Binder是生命周期中的一个非常重要的部分.搞清楚Model Binder的流程,能够帮助理解Model Binder的背后发生了什么.同时该系列文章会列举 ...
- 今天说一下Order by 这个常规东西~
Order by 在我们日常的数据库开发生活中是出镜率灰常高的. order by 的作用就是用于对查询出来的结果进行排序~对啊~人家就是这么接地气~比如按发生时间啊,首字母啊之类的都是相当常见. 今 ...
- MongoDB与衍生版的TokuMX对比
为什么会出现TokuMX呢? 查阅大量的资料和翻阅一些大牛的博客发现,MongoDB作为nosql派别的一个典型非关系型数据库其实存在许多缺陷不足之处. 然后肯定就会有有人跳出来,来做一个衍生的东西, ...
- IE下innerText与FoxFire下textContent属性的不同
<div> 我是中国 人 我<br/>爱 自己 的<div>祖国</div>. <div> IE下输出 我是中国 人 我 爱 自己 的 祖国 ...
- Linux的文件时间
在windows下,一个文件有:创建时间.修改时间.访问时间.而在Linux下,一个文件也有三种时间,分别是:访问时间.修改时间.状态改动时间. 1.访问时间,读一次这个文件的内容,这个时间就会更新. ...
- android 布局下划线
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_cont ...
- c++整型->字符型转换
有itoa(),atoi(),sprintf()三个函数 使用字符串流: #include<iostream> #include<string> #include<sst ...