I have a MVVM WPF application containing a ListView containing a GridView.
Using the helper class, I create a GridViewColumn that works great.
My problem: I want twoway-bind width so that I can read the changes in width.
The code for creating the GridViewColumn now looks like this:
private static GridViewColumn CreateColumn(GridView gridView, object columnSource)
{
GridViewColumn column = new GridViewColumn();
String headerTextMember = GetHeaderTextMember(gridView);
String displayMemberMember = GetDisplayMemberMember(gridView);
String widthMember = GetWidthMember(gridView);
column.Header = GetPropertyValue(columnSource, headerTextMember);
String propertyName = GetPropertyValue(columnSource, displayMemberMember) as String;
column.DisplayMemberBinding = new Binding(propertyName);
}
return column;
}
Does anyone have some pointers to me, how can I relate the width?
source
share