我有这个在代码XAML
中显示。将用作选择菜单。ListView
C++/CX
ListView
<ListView x:Name="itemsListView"
ItemsSource="{Binding Source={StaticResource MenuDataSourceCVS}}"
HorizontalAlignment="Stretch"
Width="230"
Margin="0,45,0,0"
VerticalAlignment="Top"
Grid.Row="1"
SelectionChanged="itemsListView_SelectionChanged" SelectionMode="Single"
HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
FontFamily="Global User Interface">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Height="40" Width="230">
<TextBlock Text="{Binding Name}"
Margin="10,5" Width="150" Height="30"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"/>
<Border Height="30" Width="30" Margin="5">
<Image Source="{Binding ImageSrc}" Stretch="Fill"/>
</Border>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
正如您在下图中看到的那样,选择不会占据所有列,并且在选择时会显示一个复选标记。
有没有办法消除这种填充和复选标记?