Actually I've already tried all your suggestions.
Let me explain the problem more accurate.
As I mentioned in my original post I'm writing user control (GridView).
I'm using MVVM pattern.
And I'm adding columns programmatically to my grid:
GridViewComboBoxColumn column = new GridViewComboBoxColumn();
column.DataMemberBinding = new Binding
Path = new PropertyPath("Id"),
StringFormat = previousColumnDataMemberBinding.StringFormat
column.ItemsSource = MyItemsSources;
column.SelectedValueMemberPath = "Id";
column.DisplayMemberPath = previousColumnDataMemberBinding.Path.Path;
After running the program and adding this column I found all cells empty.
But on edit I see all values.
So currently I'm trying to implement the first solution form this
In xaml I haven't access to my column and I can't expose the ViewModel as a static resource from there.
And doing it from the code will make my control dependent from the concrete ViewModel which is unacceptable.
Can you suggest me some other solution or argue if I've been mistaken in my thoughts.