using System.Collections.Generic; using System.Windows; namespace RecipeEditorLib.DGExtension.CustomColumn { public class ExpanderColumn : EditorDataGridTemplateColumnBase { #region Constructors public ExpanderColumn() { IsExpander = true; ChildColumns = new List(); } #endregion #region Properties public static DependencyProperty IsExpanderProperty = DependencyProperty.Register("IsExpanded", typeof(bool), typeof(ExpanderColumn), new PropertyMetadata(true)); public bool IsExpanded { get => (bool)GetValue(IsExpanderProperty); set => SetValue(IsExpanderProperty, value); } /// /// 返回当前组的所有列。 /// public List ChildColumns { get; } #endregion } }