c# - 如何转换 'MS.Internal.Data.CollectionViewGroupInternal'使用?

标签 c# wpf data-binding datagrid

我引用了 this way ,并创建我的 DataGrid

但是我在调​​用命令时需要使用参数。

我看到这是一个 MS.Internal.Data.CollectionViewGroupInternal 类型,但我不知道如何转换它。

“MS.Internal.Data.CollectionViewGroupInternal”有项目和它的名字,我怎样才能得到它?或者,我可以将我的参数绑定(bind)到 CommandParameter,可能像 DataGridSelectedItem,因为我有一个 DependencyProperty单击 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));
    }

最佳答案

我从here中找到了答案.

我可以将它转换为 CollectionViewGroup,然后得到它。

关于c# - 如何转换 'MS.Internal.Data.CollectionViewGroupInternal'使用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43798626/

相关文章:

c# - 停止在 WebAPI 中显示整个堆栈跟踪

c# - 生成 .rdlc 报告在本地有效,但在部署到 azure 后无效

c# - 如何在运行时获取 WPF 元素的尺寸而不在编译时指定它们

c# - 获取图像的高度和宽度

javascript - AngularJs 货币过滤器

android - MvvmCross MvxBind 语法绑定(bind)到 ViewModel 本身(而不是 ViewModel.Property)

c# - 禁用 MSI 还原点创建

c# - 如何在给定数字的左侧放置零,最多 6 位数字,包括给定数字

wpf - 如何定位绑定(bind)错误的根源?

c# - 错误 - 数据绑定(bind)方法,例如 Eval()、XPath() 和 Bind()