我在列表视图中有一个列表框。在他们两个上,我都有 selectionchanged 事件。当我触发子控件事件时,父控件会自动触发。我需要停止这种行为。有什么提示吗?谢谢!
<ListView Name="listView1"
ItemContainerStyle="{StaticResource RowStyle}" AlternationCount="2"
SelectionChanged="listViewTask_SelectionChanged">
<ListView.View>
<GridView>
<GridViewColumn Width="150">
<GridViewColumnHeader Name="gridViewColumnHeader1"
Click="SortClick" Tag="Style"
Content="Style"
ToolTip="Click to Sort Style"/>
<GridViewColumn.CellTemplate>
<DataTemplate>
<ListBox ScrollViewer.VerticalScrollBarVisibility="Hidden"
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
BorderBrush="White"
SelectionChanged="listBox_SelectionChanged"
Name="listbox" ItemsSource="{Binding Text}"
Style="{StaticResource Textblockstyle}"
ToolTipService.ShowDuration="360000000">