Class DomainUpDownExt
Extends the DomainUpDown to provide XP Look and Feel.
Inheritance
Implements
Namespace: Syncfusion.Windows.Forms.Tools
Assembly: Syncfusion.Tools.Windows.dll
Syntax
public class DomainUpDownExt : DomainUpDown, IThemedControl, IThemeProvider, IVisualStyle, INonClientPaintingSupport, IUpDownButtonsOrientable, ISupportOffice2007Theme
Remarks
Take a look at the ThemesEnabled and ThemedBorder properties.
Constructors
DomainUpDownExt()
Initializes a new instance of the DomainUpDownExt class.
Declaration
public DomainUpDownExt()
Properties
BackColor
Gets or sets the background color. (overridden property)
Declaration
public override Color BackColor { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Color |
BeforeTouchSize
Gets/Sets Control size before touch enabled
Declaration
public Size BeforeTouchSize { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Size |
Border3DStyle
Gets or sets the style of the 3D border.
Declaration
public Border3DStyle Border3DStyle { get; set; }
Property Value
| Type |
|---|
| System.Windows.Forms.Border3DStyle |
Remarks
This style is used when the BorderStyle is Fixed3D and when XP Themed drawing is disabled.
BorderColor
Gets or sets the color of the 2D border.
Declaration
public Color BorderColor { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Color |
BorderSides
Gets or sets the border sides of the control that will be drawn in 3D mode.
Declaration
public Border3DSide BorderSides { get; set; }
Property Value
| Type |
|---|
| System.Windows.Forms.Border3DSide |
BorderStyle
Gets or sets the border style for control.
Declaration
public BorderStyle BorderStyle { get; set; }
Property Value
| Type |
|---|
| System.Windows.Forms.BorderStyle |
Remarks
Overridden.Cannot set BorderStyle to None when ThemesEnabled. Use ThemedBorder property to disable borders when themed.
CanApplyTheme
Gets or sets a value indicating whether a SkinManager theme settings can be applied to the control.
Declaration
public bool CanApplyTheme { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | The default value is true. |
Remarks
This property must be initialized before applying the VisualTheme />
CanOverrideStyle
Gets or sets a value indicating whether control elements styles can be overridden by theme style settings.
Declaration
public bool CanOverrideStyle { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | Default value is false. |
Remarks
By default, the control's element styles will not be overridden by theme style settings if the style is set in sample level. If this property is enabled, element style will be overridden by theme style settings event if it is set in sample level. This property should be enabled or disabled before calling the ThemeName property of the control.
ColorScheme
Gets or sets color scheme for control.
Declaration
public Office2007Theme ColorScheme { get; set; }
Property Value
| Type |
|---|
| Office2007Theme |
ControlName
Gets the name of the control.
Declaration
public string ControlName { get; }
Property Value
| Type |
|---|
| System.String |
CreateParams
Overrides the System.Windows.Forms.Control.CreateParams property.
Declaration
protected override CreateParams CreateParams { get; }
Property Value
| Type |
|---|
| System.Windows.Forms.CreateParams |
EnableTouchMode
Gets or sets value to enable or disable the Touchmode to the controls.
Declaration
public bool EnableTouchMode { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Remarks
Scale factor will be updated automatically if scalefactor is equal to 1
Font
Overrides the base class font property.
Declaration
public override Font Font { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Font |
IsVisualStyleEnabled
Gets a value indicating whether the visual style based theme is applied to the control This also indicates whether the theme files are referred from external assemblies or not.
Declaration
public bool IsVisualStyleEnabled { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | Return true, if the visual style based theme is applied to control. Otherwise returns false. |
MaxLength
Gets or sets the maximum length of the text that can be entered into the editable portion of the control.
Declaration
public int MaxLength { get; set; }
Property Value
| Type |
|---|
| System.Int32 |
MetroColor
Gets or Sets the metrocolor
Declaration
public Color MetroColor { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Color |
Office2010ColorScheme
Gets or sets color scheme for control.
Declaration
public Office2010Theme Office2010ColorScheme { get; set; }
Property Value
| Type |
|---|
| Office2010Theme |
SpinOrientation
Gets or sets UpDownButton's orientation.
Declaration
public Orientation SpinOrientation { get; set; }
Property Value
| Type |
|---|
| System.Windows.Forms.Orientation |
ThemedBorder
Gets or sets a value indicating whether you want themed border around the control when themes are enabled.
Declaration
public bool ThemedBorder { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Remarks
This property is used only when the ThemesEnabled property is set.
ThemeName
Gets or sets the theme name of the control.
Declaration
public string ThemeName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The default value is null. |
Remarks
This ThemeStyle settings will be applied only when the VisualStyleBased theme has been applied to the control.
ThemesEnabled
Gets or sets a value indicating whether XP Themes (visual styles) should be used for this control when available.
Declaration
public bool ThemesEnabled { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
ThemeStyle
Gets or sets the DomainUpDownExtVisualStyle value used to customize the appearance of the DomainUpDownExt.
Declaration
public DomainUpDownExtVisualStyle ThemeStyle { get; set; }
Property Value
| Type |
|---|
| DomainUpDownExtVisualStyle |
Remarks
This ThemeStyle settings will be applied only when the VisualStyleBased theme has been applied to the control.
UpDownAlign
Gets or sets the alignment of the up and down buttons on the control.
Declaration
public LeftRightAlignment UpDownAlign { get; set; }
Property Value
| Type |
|---|
| System.Windows.Forms.LeftRightAlignment |
VisualStyle
Gets or sets visual style that is used for drawing a control.
Declaration
public VisualStyle VisualStyle { get; set; }
Property Value
| Type |
|---|
| VisualStyle |
Methods
ApplyScaleToControl(Single)
Scale the control based on the scale factor passed in the argument.
Declaration
public void ApplyScaleToControl(float scaleFactor)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | scaleFactor | value to scale the factor based upon. |
CreateAccessibilityInstance()
Declaration
protected override AccessibleObject CreateAccessibilityInstance()
Returns
| Type |
|---|
| System.Windows.Forms.AccessibleObject |
DefWndProc(ref Message)
Sends the specified message to the default windows procedure.
Declaration
protected override void DefWndProc(ref Message msg)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Message | msg |
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing |
DownButton()
Displays the next item in the object collection.
Declaration
public override void DownButton()
GetActiveThemeName()
Gets the active theme name of the control.
Declaration
public virtual string GetActiveThemeName()
Returns
| Type | Description |
|---|---|
| System.String | Returns the active theme name |
GetControlName(String)
Helps to override the ControlName property settings
Declaration
public virtual string GetControlName(string controlName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | controlName | ControlName |
Returns
| Type |
|---|
| System.String |
GetMouseHoverButton(Point)
Declaration
protected virtual ButtonID GetMouseHoverButton(Point ptButtonsClient)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Point | ptButtonsClient |
Returns
| Type |
|---|
| ButtonID |
Office2007ManagedColorsApplied(Office2007Colors.ManagedColorsAppliedEventArgs)
Declaration
public void Office2007ManagedColorsApplied(Office2007Colors.ManagedColorsAppliedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| Office2007Colors.ManagedColorsAppliedEventArgs | args |
Office2010ManagedColorsApplied(Office2010Colors.ManagedColorsAppliedEventArgs)
Declaration
public void Office2010ManagedColorsApplied(Office2010Colors.ManagedColorsAppliedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| Office2010Colors.ManagedColorsAppliedEventArgs | args |
OnBackColorChanged(EventArgs)
Declaration
protected override void OnBackColorChanged(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e |
OnBorder3DStyleChanged(EventArgs)
Raises the Border3DStyleChanged event.
Declaration
protected virtual void OnBorder3DStyleChanged(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e | An EventArgs that contains the event data. |
Remarks
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The OnBorder3DStyleChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnBorder3DStyleChanged in a derived class, be sure to call the base class's OnBorder3DStyleChanged method so that registered delegates receive the event.
OnBorderColorChanged(EventArgs)
Raises the BorderColorChanged event.
Declaration
protected virtual void OnBorderColorChanged(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e | An EventArgs that contains the event data. |
Remarks
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The OnBorderColorChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnBorderColorChanged in a derived class, be sure to call the base class's OnBorderColorChanged method so that registered delegates receive the event.
OnBorderSidesChanged(EventArgs)
Raises the BorderSidesChanged event.
Declaration
protected virtual void OnBorderSidesChanged(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e | An EventArgs that contains the event data. |
Remarks
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The OnBorderSidesChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OmBorderSidesChanged in a derived class, be sure to call the base class's OnBorderSidesChanged method so that registered delegates receive the event.
OnCanApplyThemeChanged(Boolean)
Helps to override the CanApplyTheme property settings
Declaration
public virtual void OnCanApplyThemeChanged(bool canApplyTheme)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | canApplyTheme |
OnCanOverrideStyleChanged(Boolean)
Helps to override the CanOverriderStyle property settings
Declaration
public virtual void OnCanOverrideStyleChanged(bool canOverrideStyle)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | canOverrideStyle |
OnEnabledChanged(EventArgs)
Declaration
protected override void OnEnabledChanged(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e |
OnFontChanged(EventArgs)
Raises the System.Windows.Forms.Control.FontChanged event.
Declaration
protected override void OnFontChanged(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e | An System.EventArgs that contains the event data. |
Remarks
Overridden.
OnGotFocus(EventArgs)
Raises the System.Windows.Forms.Control.GotFocus event.
Declaration
protected override void OnGotFocus(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e | An System.EventArgs that contains the event data. |
OnHandleCreated(EventArgs)
Raises the System.Windows.Forms.Control.HandleCreated event.
Declaration
protected override void OnHandleCreated(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e | An System.EventArgs that contains the event data. |
Remarks
Overridden
OnLayout(LayoutEventArgs)
Raises the System.Windows.Forms.Control.Layout event.
Declaration
protected override void OnLayout(LayoutEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.LayoutEventArgs | e | A System.Windows.Forms.LayoutEventArgs that contains the event data. |
Remarks
Positions child controls based on settings.
OnLostFocus(EventArgs)
Raises the System.Windows.Forms.Control.LostFocus event.
Declaration
protected override void OnLostFocus(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e | An System.EventArgs that contains the event data. |
OnMouseDown(MouseEventArgs)
Raises the System.Windows.Forms.Control.MouseDown event.
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.MouseEventArgs | e | A System.Windows.Forms.MouseEventArgs that contains the event data. |
Remarks
Gets the CapturedButton according to MousePosition
OnMouseLeave(EventArgs)
Declaration
protected override void OnMouseLeave(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e |
OnMouseMove(MouseEventArgs)
Raises the System.Windows.Forms.Control.MouseMove event.
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.MouseEventArgs | e | A System.Windows.Forms.MouseEventArgs that contains the event data. |
Remarks
Overridden and captures the Up or Down buttons based on MousePosition.
OnMouseUp(MouseEventArgs)
Declaration
protected override void OnMouseUp(MouseEventArgs mevent)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.MouseEventArgs | mevent |
OnMouseWheel(MouseEventArgs)
Declaration
protected override void OnMouseWheel(MouseEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.MouseEventArgs | e |
OnPaint(PaintEventArgs)
Raises the System.Windows.Forms.Control.Paint event.
Declaration
protected override void OnPaint(PaintEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.PaintEventArgs | e | A System.Windows.Forms.PaintEventArgs that contains the event data. |
Remarks
Overridden and activate the themes
OnSizeChanged(EventArgs)
Declaration
protected override void OnSizeChanged(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e |
OnSpinOrientationChanged(EventArgs)
Raises the SpinOrientationChanged event.
Declaration
protected virtual void OnSpinOrientationChanged(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e | An EventArgs that contains the event data. |
OnTextBoxKeyDown(Object, KeyEventArgs)
Declaration
protected override void OnTextBoxKeyDown(object source, KeyEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | source | |
| System.Windows.Forms.KeyEventArgs | e |
OnTextBoxResize(Object, EventArgs)
Raises the System.Windows.Forms.Control.Resize event.
Declaration
protected override void OnTextBoxResize(object source, EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | source | The source of the event. |
| System.EventArgs | e | An System.EventArgs that contains the event data. |
Remarks
Overridden.Sets the PreferredHeight and position controls based on settings
OnThemeNameChanged(String)
Helps to apply the ThemeName settings in control
Declaration
public virtual void OnThemeNameChanged(string themeName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | themeName | ThemeName |
PositionControls()
Positions child controls based on settings.
Declaration
protected virtual void PositionControls()
RaiseThemeChanged(Object, ThemeChangedEventArgs)
Raises the ThemeNameChanged event when theme name changed.
Declaration
protected virtual void RaiseThemeChanged(object sender, ThemeChangedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The sender value. |
| ThemeChangedEventArgs | args | A ThemeChangedEventArgs contains the event data. |
RaiseThemeChangedEvent(EventArgs)
Raises the ThemeChanged event.
Declaration
protected virtual void RaiseThemeChangedEvent(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e | An EventArgs that contains the event data. |
Remarks
The RaiseThemeChangedEvent method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding RaiseThemeChangedEvent in a derived class, be sure to call the base class's RaiseThemeChangedEvent method so that registered delegates receive the event.
UpButton()
Displays the previous item in the collection.
Declaration
public override void UpButton()
UpdateHeight()
Updates the height of the control to the preferred height based on settings.
Declaration
protected virtual void UpdateHeight()
WndProc(ref Message)
Declaration
protected override void WndProc(ref Message m)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Message | m |
Events
Border3DStyleChanged
Occurs when border's 3D style is changed.
Declaration
public event EventHandler Border3DStyleChanged
Event Type
| Type |
|---|
| System.EventHandler |
BorderColorChanged
Occurs when border's color is changed.
Declaration
public event EventHandler BorderColorChanged
Event Type
| Type |
|---|
| System.EventHandler |
BorderSidesChanged
Occurs when border's sides are changed.
Declaration
public event EventHandler BorderSidesChanged
Event Type
| Type |
|---|
| System.EventHandler |
SpinOrientationChanged
Occurs when the SpinOrientation property has changed.
Declaration
public event EventHandler SpinOrientationChanged
Event Type
| Type |
|---|
| System.EventHandler |
ThemeChanged
Fired when the ThemesEnabled property is changed.
Declaration
public event EventHandler ThemeChanged
Event Type
| Type |
|---|
| System.EventHandler |
ThemeNameChanged
Occurs when theme name of the control has changed.
Declaration
public event ThemeChangedEventHandler ThemeNameChanged
Event Type
| Type |
|---|
| ThemeChangedEventHandler |
Explicit Interface Implementations
INonClientPaintingSupport.NonClientPaint(PaintEventArgs, Rectangle, Rectangle)
Declaration
IntPtr INonClientPaintingSupport.NonClientPaint(PaintEventArgs e, Rectangle displayRect, Rectangle windowRectInScreen)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.PaintEventArgs | e | |
| System.Drawing.Rectangle | displayRect | |
| System.Drawing.Rectangle | windowRectInScreen |
Returns
| Type |
|---|
| System.IntPtr |
ISupportOffice2007Theme.EnableOffice2007Style()
Declaration
void ISupportOffice2007Theme.EnableOffice2007Style()
ISupportOffice2007Theme.Office2007ColorTheme
Declaration
Office2007Theme ISupportOffice2007Theme.Office2007ColorTheme { get; set; }
Returns
| Type |
|---|
| Office2007Theme |
IVisualStyle.VisualTheme
Declaration
string IVisualStyle.VisualTheme { get; set; }
Returns
| Type |
|---|
| System.String |
IThemeProvider.BaseThemeName
Gets or sets the Base Theme name of the theme
Declaration
string IThemeProvider.BaseThemeName { get; set; }
Returns
| Type |
|---|
| System.String |