WPF. How do I create many LIstViews with the same look.
Posted
by Erik Z
on Stack Overflow
See other posts from Stack Overflow
or by Erik Z
Published on 2010-05-22T04:51:34Z
Indexed on
2010/05/22
5:00 UTC
Read the original article
Hit count: 281
I've defined a listview in my recent project and realized that I will be using more listviews looking exactly the same and having the same solumns. Since I'm new to WPF am I curious of teh best way to do this. Is it to create a usercontrol? Use styles? I've tried to use styles but it didnt work the way I was hoping. I tried to set the "View" property using style, like this.
<Style x:Key="ListViewStyle" TargetType="{x:Type ListView}">
<Setter Property="View">
<ListView.View>
<GridView>
But it didnt work so I'm asking for your opinion?! Thanks.
© Stack Overflow or respective owner