我有一个带有图像的ListView。Looks like this
在显示用于选择这些图像的复选框时,这些复选框与顶部对齐。但我想将复选框对齐图像的中心To be like this 如何在listview中对齐复选框?
<ListView Name="myList" ItemsSource="{Binding PetrolCompany}">
<ListView.ItemTemplate>
<DataTemplate>
<Button BorderThickness="1">
<Grid VerticalAlignment="Center" Height="100">
<Grid.RowDefinitions>
<RowDefinition Height="3*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Image Source="{Binding ImageSourse}"/>
<TextBlock Text="{Binding CompanyName}"/>
</Grid>
</Button>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>