I have a GridView and a PropertyGrid both created in code not XAML.
Now I try to bind the selected item of the GridView to the PropertyGrid also via code and not XAML.
I tried something like this:
Binding propGridBinding = new Binding("SelectedItem");
propGridBinding.ElementName = "myTreeListView"; // assuming this is the name of the GridView
propertyGrid.Item = propGridBinding;
But when I try to run this code I get an error message like this:
An unhandled exception of type 'System.NotSupportedException' occurred in System.dll
Additional information: 'CultureInfoIetfLanguageTagConverter' is unable to convert '(null)' to 'System.String'.
I even get the same type of error if I just try to bind the PropertyGrid to a visual element to be able to view and edit its properties.
I must be missing something.
Any help is very much appreciated.