我有一个显示对象集合的 ListView。我想在单击 ListViewItem 时禁用“蓝色效果”或“蓝色矩形”,并仅启用此项目中的对象。有没有人对此有想法?
这是我的 ListViewItems 之一的示例:
这是我的列表视图:
<ListView SelectionMode="Single" IsManipulationEnabled="True" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalAlignment="Stretch" ScrollViewer.VerticalScrollBarVisibility="Auto" ItemsSource="{Binding ChildrenList}" Background="Transparent" BorderBrush="Transparent" >
<ListView.LayoutTransform>
<RotateTransform Angle="{Binding IsVertical, Converter={StaticResource AngleOfBool}}"></RotateTransform>
</ListView.LayoutTransform>
<ListView.ItemTemplate>
<DataTemplate>
<Grid HorizontalAlignment="Stretch" Background="Transparent" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<CheckBox Content="{Binding Id}" Height="auto" Name="Flag" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="0" IsChecked="{Binding IsVisible}"/>
<Grid Grid.Column="1">
<area:Area HorizontalAlignment="Stretch" Visibility="{Binding IsVisible, Converter={StaticResource VisibilityOfBool}}" />
</Grid>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>