How to convert 'MS.Internal.Data.CollectionViewGroupInternal' to use?
c#, data-binding, datagrid, wpf
Solution
I find the answer from here.
I can cast that to `CollectionViewGroup`, and got it.
Problem
I reference this way, and create my `DataGrid`. But I need to use parameter when I invoke Command. I see that is a `MS.Internal.Data.CollectionViewGroupInternal` type, and I don't know how to convert it. The 'MS.Internal.Data.CollectionViewGroupInternal' have items and it's name, how can I get it? Or, I can bind my parameter to `CommandParameter`, maybe like `SelectedItem` of `DataGrid`, because I have a `DependencyProperty` for click `Expander`. ``` public class ExpanderDataGrid : DataGrid { public string SelectedExpanderName { get { return (string)GetValue(SelectedExpanderNameProperty); } set { SetValue(SelectedExpanderNameProperty, value); } } public static readonly DependencyProperty SelectedExpanderNameProperty = DependencyProperty.Register("SelectedExpanderName", typeof(string), typeof(ExpanderDataGrid), new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.BindsTwoWayByDefault)); } ```