Exemple #1
0
 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;
 }
Exemple #2
0
        public void ApplyTreeStyle(TreeStyle style)
        {
            ApplyTreeNodeStyle(style);

            RowSelectionBackground = style.SelectionBackground;
            RowHoverBackground     = style.SelectionHoverBackground;
        }
Exemple #3
0
        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();
        }
Exemple #4
0
 public Tree(TreeStyle style) : base(style, null)
 {
     CanFocus = true;
     if (style != null)
     {
         ApplyTreeStyle(style);
     }
 }
Exemple #5
0
        public void ApplyTreeStyle(TreeStyle style)
        {
            ApplyTreeNodeStyle(style);

            RowSelectionBackground             = style.RowSelectionBackground;
            RowSelectionBackgroundWithoutFocus = style.RowSelectionBackgroundWithoutFocus;
            RowHoverBackground = style.RowHoverBackground;
        }
Exemple #6
0
 public Tree(TreeStyle style) : base(style, null)
 {
     AcceptsKeyboardFocus = true;
     if (style != null)
     {
         ApplyTreeStyle(style);
     }
 }
Exemple #7
0
        public void ApplyTreeNodeStyle(TreeStyle style)
        {
            ApplyWidgetStyle(style);

            if (style.MarkStyle != null)
            {
                _mark.ApplyImageButtonStyle(style.MarkStyle);
                _label.ApplyTextBlockStyle(style.LabelStyle);
            }

            TreeStyle = style;
        }
Exemple #8
0
        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;
        }
Exemple #9
0
        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);
            }
        }
Exemple #10
0
        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;
        }
Exemple #11
0
        public void ApplyPropertyGridStyle(TreeStyle style)
        {
            ApplyWidgetStyle(style);

            PropertyGridStyle = style;
        }
Exemple #12
0
 public PropertyGrid(TreeStyle style, string category) : this(style, category, null)
 {
 }
Exemple #13
0
        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();
        }
Exemple #14
0
 public void ApplyTreeStyle(TreeStyle style)
 {
     ApplyTreeNodeStyle(style);
 }
Exemple #15
0
 public TreeStyle(TreeStyle style) : base(style)
 {
     MarkStyle  = new ImageButtonStyle(style.MarkStyle);
     LabelStyle = new TextBlockStyle(style.LabelStyle);
 }