C# Class ComponentFactory.Krypton.Toolkit.KryptonButton

Inheritance: VisualSimpleBase, IButtonControl, IContentValues
Mostra file Open project: ComponentFactory/Krypton Class Usage Examples

Private Properties

Property Type Description
OnButtonClick void
OnButtonSelect void
OnButtonTextChanged void
ResetButtonStyle void
ShouldSerializeButtonStyle bool
ShouldSerializeOverrideDefault bool
ShouldSerializeOverrideFocus bool
ShouldSerializeStateCommon bool
ShouldSerializeStateDisabled bool
ShouldSerializeStateNormal bool
ShouldSerializeStatePressed bool
ShouldSerializeStateTracking bool
ShouldSerializeText bool
ShouldSerializeValues bool

Public Methods

Method Description
GetImage ( PaletteState state ) : Image

Gets the content image.

GetImageTransparentColor ( PaletteState state ) : Color

Gets the image color that should be transparent.

GetLongText ( ) : string

Gets the content long text.

GetShortText ( ) : string

Gets the content short text.

KryptonButton ( ) : System

Initialize a new instance of the KryptonButton class.

NotifyDefault ( bool value ) : void

Notifies a control that it is the default button so that its appearance and behavior is adjusted accordingly.

PerformClick ( ) : void

Generates a Click event for the control.

ResetText ( ) : void

Resets the Text property to its default value.

SetFixedState ( PaletteState state ) : void

Fix the control to a particular palette state.

Protected Methods

Method Description
ContextMenuClosed ( ) : void

Called when a context menu has just been closed.

CreateButtonValues ( NeedPaintHandler needPaint ) : ButtonValues

Creates a values storage object appropriate for control.

OnClick ( EventArgs e ) : void

Raises the Click event.

OnCommandPropertyChanged ( object sender, PropertyChangedEventArgs e ) : void

Handles a change in the property of an attached command.

OnEnabledChanged ( EventArgs e ) : void

Raises the EnabledChanged event.

OnGotFocus ( EventArgs e ) : void

Raises the GotFocus event.

OnKryptonCommandChanged ( EventArgs e ) : void

Raises the KryptonCommandChanged event.

OnLostFocus ( EventArgs e ) : void

Raises the LostFocus event.

ProcessMnemonic ( char charCode ) : bool

Processes a mnemonic character.

SetStyles ( ButtonStyle buttonStyle ) : void

Update the state objects to reflect the new button style.

Private Methods

Method Description
OnButtonClick ( object sender, MouseEventArgs e ) : void
OnButtonSelect ( object sender, MouseEventArgs e ) : void
OnButtonTextChanged ( object sender, EventArgs e ) : void
ResetButtonStyle ( ) : void
ShouldSerializeButtonStyle ( ) : bool
ShouldSerializeOverrideDefault ( ) : bool
ShouldSerializeOverrideFocus ( ) : bool
ShouldSerializeStateCommon ( ) : bool
ShouldSerializeStateDisabled ( ) : bool
ShouldSerializeStateNormal ( ) : bool
ShouldSerializeStatePressed ( ) : bool
ShouldSerializeStateTracking ( ) : bool
ShouldSerializeText ( ) : bool
ShouldSerializeValues ( ) : bool

Method Details

ContextMenuClosed() protected method

Called when a context menu has just been closed.
protected ContextMenuClosed ( ) : void
return void

CreateButtonValues() protected method

Creates a values storage object appropriate for control.
protected CreateButtonValues ( NeedPaintHandler needPaint ) : ButtonValues
needPaint NeedPaintHandler Delegate for notifying paint requests.
return ButtonValues

GetImage() public method

Gets the content image.
public GetImage ( PaletteState state ) : Image
state PaletteState The state for which the image is needed.
return Image

GetImageTransparentColor() public method

Gets the image color that should be transparent.
public GetImageTransparentColor ( PaletteState state ) : Color
state PaletteState The state for which the image is needed.
return Color

GetLongText() public method

Gets the content long text.
public GetLongText ( ) : string
return string

GetShortText() public method

Gets the content short text.
public GetShortText ( ) : string
return string

KryptonButton() public method

Initialize a new instance of the KryptonButton class.
public KryptonButton ( ) : System
return System

NotifyDefault() public method

Notifies a control that it is the default button so that its appearance and behavior is adjusted accordingly.
public NotifyDefault ( bool value ) : void
value bool true if the control should behave as a default button; otherwise false.
return void

OnClick() protected method

Raises the Click event.
protected OnClick ( EventArgs e ) : void
e System.EventArgs An EventArgs that contains the event data.
return void

OnCommandPropertyChanged() protected method

Handles a change in the property of an attached command.
protected OnCommandPropertyChanged ( object sender, PropertyChangedEventArgs e ) : void
sender object Source of the event.
e System.ComponentModel.PropertyChangedEventArgs A PropertyChangedEventArgs that contains the event data.
return void

OnEnabledChanged() protected method

Raises the EnabledChanged event.
protected OnEnabledChanged ( EventArgs e ) : void
e System.EventArgs An EventArgs that contains the event data.
return void

OnGotFocus() protected method

Raises the GotFocus event.
protected OnGotFocus ( EventArgs e ) : void
e System.EventArgs An EventArgs that contains the event data.
return void

OnKryptonCommandChanged() protected method

Raises the KryptonCommandChanged event.
protected OnKryptonCommandChanged ( EventArgs e ) : void
e System.EventArgs An EventArgs containing the event data.
return void

OnLostFocus() protected method

Raises the LostFocus event.
protected OnLostFocus ( EventArgs e ) : void
e System.EventArgs An EventArgs that contains the event data.
return void

PerformClick() public method

Generates a Click event for the control.
public PerformClick ( ) : void
return void

ProcessMnemonic() protected method

Processes a mnemonic character.
protected ProcessMnemonic ( char charCode ) : bool
charCode char The mnemonic character entered.
return bool

ResetText() public method

Resets the Text property to its default value.
public ResetText ( ) : void
return void

SetFixedState() public method

Fix the control to a particular palette state.
public SetFixedState ( PaletteState state ) : void
state PaletteState Palette state to fix.
return void

SetStyles() protected method

Update the state objects to reflect the new button style.
protected SetStyles ( ButtonStyle buttonStyle ) : void
buttonStyle ButtonStyle New button style.
return void