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>