ComponentFactory.Krypton.Toolkit.PaletteContentJustShortText.PopulateFromBase C# (CSharp) Method

PopulateFromBase() public method

Populate values from the base palette.
public PopulateFromBase ( PaletteState state ) : void
state PaletteState Palette state to use when populating.
return void
        public override void PopulateFromBase(PaletteState state)
        {
            // Get the values and set into storage
            Draw = GetContentDraw(state);
            ShortText.Font = GetContentShortTextFont(state);
            ShortText.Hint = GetContentShortTextHint(state);
            ShortText.Prefix = GetContentShortTextPrefix(state);
            ShortText.Trim = GetContentShortTextTrim(state);
            ShortText.TextH = GetContentShortTextH(state);
            ShortText.TextV = GetContentShortTextV(state);
            ShortText.MultiLineH = GetContentShortTextMultiLineH(state);
            ShortText.MultiLine = GetContentShortTextMultiLine(state);
            ShortText.Color1 = GetContentShortTextColor1(state);
            ShortText.Color2 = GetContentShortTextColor2(state);
            ShortText.ColorStyle = GetContentShortTextColorStyle(state);
            ShortText.ColorAlign = GetContentShortTextColorAlign(state);
            ShortText.ColorAngle = GetContentShortTextColorAngle(state);
            ShortText.Image = GetContentShortTextImage(state);
            ShortText.ImageStyle = GetContentShortTextImageStyle(state);
            ShortText.ImageAlign = GetContentShortTextImageAlign(state);
            Padding = GetContentPadding(state);
        }

Usage Example

 /// <summary>
 /// Populate values from the base palette.
 /// </summary>
 /// <param name="common">Reference to common settings.</param>
 /// <param name="state">State to inherit.</param>
 public void PopulateFromBase(KryptonPaletteCommon common,
                              PaletteState state)
 {
     common.StateCommon.BackStyle   = PaletteBackStyle.ContextMenuItemHighlight;
     common.StateCommon.BorderStyle = PaletteBorderStyle.ContextMenuItemHighlight;
     _paletteItemHighlight.PopulateFromBase(state);
     common.StateCommon.BackStyle    = PaletteBackStyle.ContextMenuItemImage;
     common.StateCommon.BorderStyle  = PaletteBorderStyle.ContextMenuItemImage;
     common.StateCommon.ContentStyle = PaletteContentStyle.ContextMenuItemImage;
     _paletteItemImage.PopulateFromBase(state);
     common.StateCommon.ContentStyle = PaletteContentStyle.ContextMenuItemShortcutText;
     _paletteItemShortcutText.PopulateFromBase(state);
     common.StateCommon.BackStyle   = PaletteBackStyle.ContextMenuSeparator;
     common.StateCommon.BorderStyle = PaletteBorderStyle.ContextMenuSeparator;
     _paletteItemSplit.PopulateFromBase(state);
     common.StateCommon.ContentStyle = PaletteContentStyle.ContextMenuItemTextStandard;
     _paletteItemTextStandard.PopulateFromBase(state);
     common.StateCommon.ContentStyle = PaletteContentStyle.ContextMenuItemTextAlternate;
     _paletteItemTextAlternate.PopulateFromBase(state);
 }