【发布时间】:2015-02-18 20:47:29
【问题描述】:
这是我 page.xaml 中的 LongListSelector:
<phone:LongListSelector Name="ModuleList"
Margin="0,0,0,0"
Padding="0,0,0,0"
Style="{StaticResource LLSFloatingScrollbarStyle}"
ItemTemplate="{StaticResource ModuleListTemplate}"
ItemsSource="{Binding Modules}"/>
我的模板:
<DataTemplate x:Key="ModuleListTemplate">
<StackPanel Margin="{Binding StackModuleMargin}">
...
<toolkit:ToggleSwitch x:Name="LockSwitch"
Grid.Row="2" Margin="0,4,0,-26" Padding="0"
Content="" SwitchForeground="{StaticResource TrackitoOrange}"
IsChecked="{Binding IsToggleCheck, Mode=TwoWay}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<Command:EventToCommand Command="{Binding DataContext.LockSwitchTapCommand, ElementName=LayoutRoot}"
CommandParameter="{Binding}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</toolkit:ToggleSwitch>
...
问题是当我只是滚动列表时会引发点击。是的,我的手指在切换的位置,但我想在滚动时修复它,然后切换不应更改。谢谢
【问题讨论】:
标签: xaml silverlight windows-phone-8 gesture longlistselector