提示控件: ProgressRing; 范围控件: ProgressBar, Slider
介绍
重新想象 Windows 8 Store Apps 之提示控件
ProgressRing - 进度圈控件
重新想象 Windows 8 Store Apps 之范围控件
ProgressBar - 进度条控件
Slider - 滑动条控件
示例
1、ProgressRing 的 Demo
ProgressRingDemo.xaml
<Page x:Class="XamlDemo.Controls.ProgressRingDemo" 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 Margin="120 0 0 0"> <!-- ProgressRing - 进度圈控件 IsActive - 是否显示 --> <ProgressRing IsActive="{Binding IsChecked, ElementName=chkRunning}" Width="200" Height="200" HorizontalAlignment="Left" /> <CheckBox Name="chkRunning" Content="Running" IsChecked="True" /> </StackPanel> </Grid> </Page>
2、ProgressBar 的 Demo
ProgressBarDemo.xaml
<Page x:Class="XamlDemo.Controls.ProgressBarDemo" 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 Margin="120 0 0 0"> <!-- ProgressBar - 进度条控件 IsIndeterminate - 是否是无法确定进度的进度条 Minimum - 进度条的最小值 Maximum - 进度条的最大值 Value - 进度条的当前值 ShowPaused - 显示暂停状态 ShowError - 显示错误状态 ValueChanged - 进度条的当前值发生变化后所触发的事件 --> <ProgressBar IsIndeterminate="True" Width="200" HorizontalAlignment="Left" ShowPaused="{Binding IsChecked, ElementName=radPaused}" ShowError="{Binding IsChecked, ElementName=radError}" /> <ProgressBar IsIndeterminate="False" Width="200" Minimum="0" Maximum="100" Value="50" HorizontalAlignment="Left" Margin="0 20 0 0" ShowPaused="{Binding IsChecked, ElementName=radPaused}" ShowError="{Binding IsChecked, ElementName=radError}"/> <StackPanel Orientation="Horizontal" Margin="0 20 0 0"> <RadioButton x:Name="radRunning" GroupName="ProgressState" Content="Running" IsChecked="True"/> <RadioButton x:Name="radPaused" GroupName="ProgressState" Content="Paused"/> <RadioButton x:Name="radError" GroupName="ProgressState" Content="Error"/> </StackPanel> </StackPanel> </Grid> </Page>
以上是小编为您精心准备的的内容,在的博客、问答、公众号、人物、课程等栏目也有的相关内容,欢迎继续使用右上角搜索按钮进行搜索windows
, progressbar
, 控件
, windows store app
, store
, 提示
, windows store
, 范围
提示控件
,以便于您获取更多的相关知识。
时间: 2024-10-07 14:14:36