ComponentFactory.Krypton.Toolkit.PaletteBorderEdge.GetBorderWidth C# (CSharp) Метод

GetBorderWidth() публичный Метод

Gets the border width.
public GetBorderWidth ( PaletteState state ) : int
state PaletteState Palette value should be applicable to this state.
Результат int
        public int GetBorderWidth(PaletteState state)
        {
            if (Width != -1)
                return Width;
            else
                return _inherit.GetBorderWidth(state);
        }

Usage Example

Пример #1
0
        /// <summary>
        /// Discover the preferred size of the element.
        /// </summary>
        /// <param name="context">Layout context.</param>
        public override Size GetPreferredSize(ViewLayoutContext context)
        {
            Debug.Assert(context != null);

            // We have no preferred size by default
            Size preferredSize = Size.Empty;

            // Apply the border width in appropriate orientation
            if (Orientation == Orientation.Horizontal)
            {
                preferredSize.Height = _palette.GetBorderWidth(State);
            }
            else
            {
                preferredSize.Width = _palette.GetBorderWidth(State);
            }

            return(preferredSize);
        }
All Usage Examples Of ComponentFactory.Krypton.Toolkit.PaletteBorderEdge::GetBorderWidth