Пример #1
0
 /// <summary>
 /// Groups properties vertically together with a title, an optional subtitle, and an optional horizontal line.
 /// </summary>
 /// <param name="title">The title-</param>
 /// <param name="subtitle">Optional subtitle.</param>
 /// <param name="alignment">The text alignment.</param>
 /// <param name="horizontalLine">Horizontal line.</param>
 /// <param name="boldTitle">Bold text.</param>
 /// <param name="indent">Whether or not to indent all group members.</param>
 /// <param name="order">The group order.</param>
 public TitleGroupAttribute(string title, string subtitle = null, TitleAlignments alignment = TitleAlignments.Left, bool horizontalLine = true, bool boldTitle = true, bool indent = false, int order = 0) : base(title, order)
 {
     this.Subtitle       = subtitle;
     this.Alignment      = alignment;
     this.HorizontalLine = horizontalLine;
     this.BoldTitle      = boldTitle;
     this.Indent         = indent;
 }
Пример #2
0
 /// <summary>
 /// Creates a title above any property in the inspector.
 /// </summary>
 /// <param name="title">The title displayed above the property in the inspector.</param>
 /// <param name="subtitle">Optional subtitle</param>
 /// <param name="titleAlignment">Title alignment</param>
 /// <param name="horizontalLine">Horizontal line</param>
 /// <param name="bold">If <c>true</c> the title will be drawn with a bold font.</param>
 public TitleAttribute(string title, string subtitle = null, TitleAlignments titleAlignment = TitleAlignments.Left, bool horizontalLine = true, bool bold = true)
 {
     this.Title          = title ?? "null";
     this.Subtitle       = subtitle;
     this.Bold           = bold;
     this.TitleAlignment = titleAlignment;
     this.HorizontalLine = horizontalLine;
 }
Пример #3
0
        /// <summary>
        /// Combines TitleGroup attributes.
        /// </summary>
        /// <param name="other">The other group attribute to combine with.</param>
        protected override void CombineValuesWith(PropertyGroupAttribute other)
        {
            var t = other as TitleGroupAttribute;

            if (this.Subtitle != null)
            {
                t.Subtitle = this.Subtitle;
            }
            else
            {
                this.Subtitle = t.Subtitle;
            }

            if (this.Alignment != TitleAlignments.Left)
            {
                t.Alignment = this.Alignment;
            }
            else
            {
                this.Alignment = t.Alignment;
            }

            if (this.HorizontalLine != true)
            {
                t.HorizontalLine = this.HorizontalLine;
            }
            else
            {
                this.HorizontalLine = t.HorizontalLine;
            }

            if (this.BoldTitle != true)
            {
                t.BoldTitle = this.BoldTitle;
            }
            else
            {
                this.BoldTitle = t.BoldTitle;
            }

            if (this.Indent == true)
            {
                t.Indent = this.Indent;
            }
            else
            {
                this.Indent = t.Indent;
            }
        }
Пример #4
0
        /// <inheritdoc />
        /// <summary>Initializes a new instance of the <see cref="T:VisualPlus.Toolkit.Controls.Layout.VisualGroupBox" /> class.</summary>
        public VisualGroupBox()
        {
            _boxStyle        = GroupBoxStyle.Default;
            _stringAlignment = StringAlignment.Center;
            _titleAlignment  = TitleAlignments.Top;
            _titleBoxVisible = Settings.DefaultValue.TitleBoxVisible;
            _titleBoxHeight  = 25;
            _borderEdge      = new BorderEdge();

            Size    = new Size(220, 180);
            _border = new Border();
            Padding = new Padding(5, _titleBoxHeight + _border.Thickness, 5, 5);

            Controls.Add(_borderEdge);

            UpdateTheme(Settings.DefaultValue.DefaultStyle);
        }
Пример #5
0
 public TitleGroup(string str, TitleAlignments alignment = TitleAlignments.Centered)
 {
 }