いくつかのカスタムテンプレートでSilverlightToolkitで使用可能なExpanderViewコントロールを使用しています。すべて正常に機能しますが、ExpanderViewが折りたたまれている場合、ExpanderViewが展開されたときにアイテムが存在するヘッダーの下の領域をクリックします。そのアイテムのクリックイベントが発生します。
どうすればこれを修正できますか?どういうわけか、ExpanderViewが折りたたまれているときにタップコマンドを削除するか、ItemPanelを削除して、展開されているときに再度追加する必要がありますか?
<DataTemplate x:Key="CustomItemTemplate">
<Image delay:LowProfileImageLoader.UriSource="{Binding}" Width="156" Height="95" >
<i:Interaction.Triggers>
<i:EventTrigger EventName="Tap">
<cmd:EventToCommand Command="{Binding Storage.ImageTapCommand, Source={StaticResource Locator}}" CommandParameter="{Binding}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</Image>
</DataTemplate>
<toolkit:ExpanderView Grid.Column="1" Header="{Binding}"
Expander="{Binding}" IsExpanded="{Binding IsExpanded, Mode=TwoWay}"
ItemsSource="{Binding Files}" HeaderTemplate="{StaticResource CustomHeaderTemplate}"
ExpanderTemplate="{StaticResource CustomExpanderTemplate}"
ItemTemplate="{StaticResource CustomItemTemplate}" >
<toolkit:ExpanderView.ItemsPanel>
<ItemsPanelTemplate>
<toolkit:WrapPanel />
</ItemsPanelTemplate>
</toolkit:ExpanderView.ItemsPanel>
</toolkit:ExpanderView>