c# - WPF ListView: How to style selected items with rounded corners like in Explorer -
this link question asked before, concerns treeview:
wpf treeview: how style selected items rounded corners in explorer
my question : how migrate solution on listview ?
the answers little disordered, didn't understand what's happening there !
i thought question sounded familiar. :)
so, should able use same code, use visual studio find , replace treeview listview. of course there few parts image.source , ismousedirectlyoveritem helper may need alter more carefully. part, find , replace function should work. treeview , listview have absolutely loads of identical properties.
let me know if have problems doing this.
you can change hierarchicaldatatemplate normal 1 this:
<datatemplate datatype="{x:type viewmodels:objectbaseviewmodel}"> <stackpanel orientation="horizontal" margin="2,1,5,2"> <grid margin="0,0,3,0"> <image name="icon" source="/explorertreeview/images/folder.png"/> </grid> <textblock text="{binding name}" /> </stackpanel> </datatemplate> let me know if have misunderstood problem.
Comments
Post a Comment