ComponentFactory.Krypton.Toolkit.KryptonPaletteInputControl.SetRedirector C# (CSharp) Method

SetRedirector() public method

Update the redirector with new reference.
public SetRedirector ( PaletteRedirect redirect ) : void
redirect PaletteRedirect Target redirector.
return void
        public void SetRedirector(PaletteRedirect redirect)
        {
            _stateCommon.SetRedirector(redirect);
        }

Usage Example

Esempio n. 1
0
        /// <summary>
        /// Initialize a new instance of the KryptonPaletteInputControls class.
        /// </summary>
        /// <param name="redirector">Palette redirector for sourcing inherited values.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        internal KryptonPaletteInputControls(PaletteRedirect redirector,
                                             NeedPaintHandler needPaint)
        {
            Debug.Assert(redirector != null);

            // Create the input control style specific and common palettes
            InputControlCommon     = new KryptonPaletteInputControl(redirector, PaletteBackStyle.InputControlStandalone, PaletteBorderStyle.InputControlStandalone, PaletteContentStyle.InputControlStandalone, needPaint);
            InputControlStandalone = new KryptonPaletteInputControl(redirector, PaletteBackStyle.InputControlStandalone, PaletteBorderStyle.InputControlStandalone, PaletteContentStyle.InputControlStandalone, needPaint);
            InputControlRibbon     = new KryptonPaletteInputControl(redirector, PaletteBackStyle.InputControlRibbon, PaletteBorderStyle.InputControlRibbon, PaletteContentStyle.InputControlRibbon, needPaint);
            InputControlCustom1    = new KryptonPaletteInputControl(redirector, PaletteBackStyle.InputControlCustom1, PaletteBorderStyle.InputControlCustom1, PaletteContentStyle.InputControlCustom1, needPaint);

            // Create redirectors for inheriting from style specific to style common
            PaletteRedirectTriple redirectCommon = new PaletteRedirectTriple(redirector, InputControlCommon.StateDisabled, InputControlCommon.StateNormal, InputControlCommon.StateActive);

            // Inform the input control style to use the new redirector
            InputControlStandalone.SetRedirector(redirectCommon);
            InputControlRibbon.SetRedirector(redirectCommon);
            InputControlCustom1.SetRedirector(redirectCommon);
        }
All Usage Examples Of ComponentFactory.Krypton.Toolkit.KryptonPaletteInputControl::SetRedirector