Windows 8 Store Apps學習(4) 提示控制項和範圍控制項

來源:互聯網
上載者:User

提示控制項: 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>

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.