i want to display some information in a listview using the GridView. i have several GridViewColumns and everything works fine.
However, want the GridViewColumns content to have a VerticalAlignment (Top in this case) but the gridvewcolumn intself doesnt offer a VerticalContentAlignment dependency property. when using DisplayMemberBinding there is also no possibility to supply VerticalAlignment information.
When using a custom DataTemplate as Celltemplate, i can add a VerticalAlignment="top" dp to e.g. some textblock. however this does not work. is there any "nifty-grifty special magic trick" to fullfill this tasK? (
You can apply this style to your ListView
:
<Style TargetType="{x:Type ListView}">
<Setter Property="ItemContainerStyle">
<Setter.Value>
<Style TargetType="ListViewItem">
<Setter Property="VerticalContentAlignment" Value="Top"/>
</Style>
</Setter.Value>
</Setter>
</Style>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With