Welcome

首页 / 软件开发 / .NET编程技术 / Windows 8 Store Apps学习(3) 内容控件

Windows 8 Store Apps学习(3) 内容控件2013-12-04 博客园 webabcdToolTip, Frame, AppBar, ContentControl

介绍

重新想象 Windows 8 Store Apps 之内容控件

ToolTip - 提示框控件

Frame - 框架控件,用于导航内容

AppBar - 应用程序栏控件

ContentControl ContentPresenter - ContentPresenter 用来呈现 ContentControl 的 Content

重新想象 Windows 8 Store Apps 之容器控件

Border - 边框控件

Viewbox - 控制子元素如何拉伸的容器控件

Popup - 弹出框控件

示例

1、ToolTip 的 Demo

ToolTipDemo.xaml

<Page x:Class="XamlDemo.Controls.ToolTipDemo"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:local="using:XamlDemo.Controls"xmlns:d="http://schemas.microsoft.com/expression/blend/2008"xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"mc:Ignorable="d"><Grid Background="Transparent"> <StackPanel Name="root" Margin="120 0 0 0"><TextBlock Text="TextBlock" ToolTipService.ToolTip="ToolTipService.ToolTip" ToolTipService.Placement="Bottom" FontSize="14.667" /><!-- ToolTip - 提示框控件 Content - 提示内容 Placement - 提示框的显示位置(Bottom, Right, Mouse, Left, Top) IsOpen - 提示框是否可见 Closed - 提示框关闭后所触发的事件 Opened - 提示框打开后所触发的事件 --> <TextBlock Text="TextBlock" FontSize="14.667" Margin="0 100 0 0"> <ToolTipService.ToolTip><ToolTip Name="toolTip" Content="ToolTipService.ToolTip" Placement="Bottom" /> </ToolTipService.ToolTip> </TextBlock></StackPanel> </Grid> </Page>