Skip to content
Discussion options

You must be logged in to vote

Hi masterLazy, does using this line

<Style TargetType="ListViewItem" BasedOn="{StaticResource {x:Static GridView.GridViewItemContainerStyleKey}}">

solve the second problem of your Employee-Items being rendered by their ToString-Method rather than by the Columns you defined in XAML?

When taking a look at the very bottom of ListViewItem.xaml it seems that DefaultListViewItemStyle is set as the default style for ListViewItem. This DefaultListViewItemStyle (found in the same file) defines a ControlTemplate based on ListBoxItem and not on ListViewItem (is that a mistake maybe?). May humble guess is that this causes the fallback to the false rendering when overwriting ItemContainerStyle without…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@DisillusionedDeveloper
Comment options

Answer selected by masterLazy
@masterLazy
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants