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

PopulateFromBase() public method

Populate values from the base palette.
public PopulateFromBase ( KryptonPaletteCommon common, PaletteState state ) : void
common KryptonPaletteCommon Reference to common settings.
state PaletteState State to inherit.
return void
        public void PopulateFromBase(KryptonPaletteCommon common,
                                     PaletteState state)
        {
            common.StateCommon.BackStyle = PaletteBackStyle.ContextMenuItemImage;
            common.StateCommon.BorderStyle = PaletteBorderStyle.ContextMenuItemImage;
            common.StateCommon.ContentStyle = PaletteContentStyle.ContextMenuItemImage;
            _paletteItemImage.PopulateFromBase(state);
        }

Usage Example

 /// <summary>
 /// Populate values from the base palette.
 /// </summary>
 /// <param name="common">Reference to common settings.</param>
 public void PopulateFromBase(KryptonPaletteCommon common)
 {
     // Populate only the designated styles
     _stateCommon.PopulateFromBase(common, PaletteState.Normal);
     _stateDisabled.PopulateFromBase(common, PaletteState.Disabled);
     _stateNormal.PopulateFromBase(common, PaletteState.Normal);
     _stateHighlight.PopulateFromBase(common, PaletteState.Tracking);
     _stateChecked.PopulateFromBase(common, PaletteState.CheckedNormal);
 }