public TreeStyle(TreeStyle style) : base(style) { MarkStyle = style.MarkStyle != null ? new ImageButtonStyle(style.MarkStyle) : null; LabelStyle = style.LabelStyle != null ? new TextBlockStyle(style.LabelStyle) : null; SelectionBackground = style.SelectionBackground; SelectionHoverBackground = style.SelectionHoverBackground; }
public void ApplyTreeStyle(TreeStyle style) { ApplyTreeNodeStyle(style); RowSelectionBackground = style.SelectionBackground; RowHoverBackground = style.SelectionHoverBackground; }
public TreeNode(TreeStyle style, Tree topTree) { _topTree = topTree; ColumnSpacing = 2; RowSpacing = 2; if (_topTree != null) { _topTree.AllNodes.Add(this); } _mark = new ImageButton((ImageButtonStyle)null) { Toggleable = true, HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Center }; _mark.Down += MarkOnDown; _mark.Up += MarkOnUp; Widgets.Add(_mark); _label = new TextBlock { GridPositionX = 1, Wrap = false }; Widgets.Add(_label); HorizontalAlignment = HorizontalAlignment.Stretch; VerticalAlignment = VerticalAlignment.Stretch; ColumnsProportions.Add(new Proportion(ProportionType.Auto)); ColumnsProportions.Add(new Proportion(ProportionType.Fill)); RowsProportions.Add(new Proportion(ProportionType.Auto)); RowsProportions.Add(new Proportion(ProportionType.Auto)); // Second is yet another grid holding child nodes _childNodesGrid = new Grid { Visible = false, GridPositionX = 1, GridPositionY = 1 }; Widgets.Add(_childNodesGrid); if (style != null) { ApplyTreeNodeStyle(style); } UpdateMark(); UpdateHasRoot(); }
public Tree(TreeStyle style) : base(style, null) { CanFocus = true; if (style != null) { ApplyTreeStyle(style); } }
public void ApplyTreeStyle(TreeStyle style) { ApplyTreeNodeStyle(style); RowSelectionBackground = style.RowSelectionBackground; RowSelectionBackgroundWithoutFocus = style.RowSelectionBackgroundWithoutFocus; RowHoverBackground = style.RowHoverBackground; }
public Tree(TreeStyle style) : base(style, null) { AcceptsKeyboardFocus = true; if (style != null) { ApplyTreeStyle(style); } }
public void ApplyTreeNodeStyle(TreeStyle style) { ApplyWidgetStyle(style); if (style.MarkStyle != null) { _mark.ApplyImageButtonStyle(style.MarkStyle); _label.ApplyTextBlockStyle(style.LabelStyle); } TreeStyle = style; }
public void ApplyTreeNodeStyle(TreeStyle style) { ApplyWidgetStyle(style); if (style.MarkStyle != null) { _mark.ApplyImageButtonStyle(style.MarkStyle); _label.ApplyLabelStyle(style.LabelStyle); } TreeStyle = style; SelectionBackground = style.SelectionBackground; SelectionHoverBackground = style.SelectionHoverBackground; }
private PropertyGrid(TreeStyle style, string category, Record parentProperty) : base(null) { _parentProperty = parentProperty; ColumnSpacing = 8; RowSpacing = 8; ColumnsProportions.Add(new Proportion(ProportionType.Pixels, 150)); ColumnsProportions.Add(new Proportion(ProportionType.Fill)); Category = category; if (style != null) { ApplyPropertyGridStyle(style); } }
private PropertyGrid(TreeStyle style, string category, Record parentProperty) { InternalChild = new Grid(); _parentProperty = parentProperty; InternalChild.ColumnSpacing = 8; InternalChild.RowSpacing = 8; InternalChild.ColumnsProportions.Add(new Proportion(ProportionType.Pixels, 150)); InternalChild.ColumnsProportions.Add(new Proportion(ProportionType.Fill)); Category = category; if (style != null) { ApplyPropertyGridStyle(style); } HorizontalAlignment = HorizontalAlignment.Stretch; VerticalAlignment = VerticalAlignment.Stretch; }
public void ApplyPropertyGridStyle(TreeStyle style) { ApplyWidgetStyle(style); PropertyGridStyle = style; }
public PropertyGrid(TreeStyle style, string category) : this(style, category, null) { }
public TreeNode(TreeStyle style, Tree topTree) { InternalChild = new Grid(); _topTree = topTree; InternalChild.ColumnSpacing = 2; InternalChild.RowSpacing = 2; if (_topTree != null) { _topTree.AllNodes.Add(this); } _mark = new ImageButton((ImageButtonStyle)null) { Toggleable = true, HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Center }; _mark.PressedChanged += (s, a) => { _childNodesGrid.Visible = _mark.IsPressed; }; InternalChild.Widgets.Add(_mark); _label = new TextBlock { GridColumn = 1 }; InternalChild.Widgets.Add(_label); HorizontalAlignment = HorizontalAlignment.Stretch; VerticalAlignment = VerticalAlignment.Stretch; InternalChild.ColumnsProportions.Add(new Proportion(ProportionType.Auto)); InternalChild.ColumnsProportions.Add(new Proportion(ProportionType.Fill)); InternalChild.RowsProportions.Add(new Proportion(ProportionType.Auto)); InternalChild.RowsProportions.Add(new Proportion(ProportionType.Auto)); // Second is yet another grid holding child nodes _childNodesGrid = new Grid() { Visible = false, GridColumn = 1, GridRow = 1 }; InternalChild.Widgets.Add(_childNodesGrid); if (style != null) { ApplyTreeNodeStyle(style); } UpdateMark(); }
public void ApplyTreeStyle(TreeStyle style) { ApplyTreeNodeStyle(style); }
public TreeStyle(TreeStyle style) : base(style) { MarkStyle = new ImageButtonStyle(style.MarkStyle); LabelStyle = new TextBlockStyle(style.LabelStyle); }