[Winodows Phone 7控件详解]Silverlight toolkit for Windows Phone 7.1控件-3

2.ToggleSwitch

这个开关控件,是windows phone7独有的,Silverlight 没有实现这个控件。这个控件有两个状态Checked Unchecked

<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<toolkit:ToggleSwitch Header="ToggleSwitch" Height="121" HorizontalAlignment="Left" Margin="74,74,0,0" Name="toggleSwitch1" VerticalAlignment="Top" Width="266" IsChecked="True" Checked="toggleSwitch1_Checked" Unchecked="toggleSwitch1_Unchecked" />
<toolkit:ToggleSwitch Header="ToggleSwitch" Height="116" HorizontalAlignment="Left" Margin="74,201,0,0" Name="toggleSwitch2" VerticalAlignment="Top" Width="266" />
</Grid>

 3.WrapPanel

包含在容器里的元素从左到右从上到下依次安排位置,并且会自动换行,用法和silverlight一样的。

<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<toolkit:WrapPanel Height="280" HorizontalAlignment="Left" Margin="86,82,0,0" Name="wrapPanel1" VerticalAlignment="Top" Width="343">
<Image Width="100" Height="100" Source="Images/log.jpg"/>
<Image Width="100" Height="100" Source="Images/log.jpg"/>
<Image Width="100" Height="100" Source="Images/log.jpg"/>
<Image Width="100" Height="100" Source="Images/log.jpg"/>
<Image Width="100" Height="100" Source="Images/log.jpg"/>
<Image Width="100" Height="100" Source="Images/log.jpg"/>
</toolkit:WrapPanel>
</Grid>

posted @ 2012-04-07 22:21  DebugLZQ  阅读(524)  评论(0编辑  收藏  举报