我开发 Windows Phone 8 应用程序。这是我的 XAML
项目模板
<phone:PhoneApplicationPage.Resources>
<data:AppCollection x:Key="AppCollection"/>
<DataTemplate x:Key="AppItemTemplate">
<StackPanel Margin="0,-14,0,24" Tap="OnItemContentTap" >
<TextBlock Text="{Binding Name}"
Margin="0,0,0,-4"
FontSize="{StaticResource PhoneFontSizeExtraLarge}"
FontFamily="{StaticResource PhoneFontFamilySemiLight}"/>
<TextBlock Text="{Binding Body}"
Margin="0,0,0,-4"
Foreground="{StaticResource PhoneSubtleBrush}"
FontSize="{StaticResource PhoneFontSizeNormal}"
FontFamily="{StaticResource PhoneFontFamilyLight}"/>
<TextBlock Text="{Binding Description}"
Foreground="{StaticResource PhoneSubtleBrush}"
FontSize="{StaticResource PhoneFontSizeNormal}"/>
</StackPanel>
</DataTemplate>
</phone:PhoneApplicationPage.Resources>
这是 LongListMultiSelector
<toolkit:LongListMultiSelector x:Name="AppList"
Margin="0,14,-12,0"
ItemsSource="{StaticResource AppCollection}"
LayoutMode="List"
SelectionChanged="OnAppListSelectionChanged"
IsSelectionEnabledChanged="OnAppListIsSelectionEnabledChanged"
ItemTemplate="{StaticResource AppItemTemplate}"
/>
</phone:PivotItem>
这是应用程序的屏幕截图:
所以我需要有相同的 LongListMultiSelector 但有 ToggleSwitchers。就像在这张照片上:
Is it possible to add toggleswitches to longlist and hide switches when select is active ?