HypernovaDesktop Components · docs
Binarymission
WinFormsOffice Window › ModernChromeWindow

ModernChromeWindow

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WinForms.Controls.Windows

A custom Window component that presents UI/UX similar to many modern application windows, including that of MS Office, Win8 (metro style) Window styles.

public class ModernChromeWindow : Form, IModernChromeHostWindow

Inherits from / implements: Form, IModernChromeHostWindow

Members at a glance

ModernChromeWindowInitializes a new instance of the ModernChromeWindow class.
AppIconLeftMarginGets or sets the application icon left margin.
BackgroundBrushGets or sets the Form background brush.
BackgroundDisabledCloseCommandButtonGets or sets the background brush when in "disabled state" for the internal close command button.
BackgroundDisabledMaximizeRestoreCommandButtonGets or sets the background brush for the "disabled state" for drawing the maximize / restore command buttons.
BackgroundDisabledMinimizeCommandButtonGets or sets the background brush for "disabled state" minimize command button.
BackgroundHotCloseCommandButtonGets or sets the background brush when in "hot state" for the internal close command button.
BackgroundHotMaximizeRestoreCommandButtonGets or sets the background brush for the "hot state" for drawing the maximize / restore command buttons.
BackgroundHotMinimizeCommandButtonGets or sets the background brush for "hot state" minimize command button.
BackgroundNormalCloseCommandButtonGets or sets the background brush when in "normal state" for the internal close command button.
BackgroundNormalMaximizeRestoreCommandButtonGets or sets the background brush for the "normal state" for drawing the maximize / restore command buttons.
BackgroundNormalMinimizeCommandButtonGets or sets the background brush for "normal state" minimize command button.
BackgroundPressedCloseCommandButtonGets or sets the background brush when in "pressed state" for the internal close command button.
BackgroundPressedMaximizeRestoreCommandButtonGets or sets the background brush for the "pressed state" for drawing the maximize / restore command buttons.
BackgroundPressedMinimizeCommandButtonGets or sets the background brush for "pressed state" minimize command button.
BorderColorDisabledCloseCommandButtonGets or sets the border color when in "disabled state" for the close command button.
BorderColorDisabledMaximiseRestoreCommandButtonGets or sets the border color when in "disabled state" for the maximize/restore command buttons.
BorderColorDisabledMinimizeCommandButtonGets or sets the border color when in "disabled state" for the minimize command button.
BorderColorHotCloseCommandButtonGets or sets the border color when in "hot state" for the close command button.
BorderColorHotMaximiseRestoreCommandButtonGets or sets the border color when in "hot state" for the maximize / restore command buttons.
BorderColorHotMinimizeCommandButtonGets or sets the border color when in "hot state" for the minimize command button.
BorderColorNormalCloseCommandButtonGets or sets the border color when in "normal state" for the close command button.
BorderColorNormalMaximiseRestoreCommandButtonGets or sets the border color when in "normal state" for the maximize/restore command buttons.
BorderColorNormalMinimizeCommandButtonGets or sets the border color when in "normal state" for the minimize command button.
BorderColorPressedCloseCommandButtonGets or sets the border color when in "pressed state" for the close command button.
BorderColorPressedMaximiseRestoreCommandButtonGets or sets the border color when in "pressed state" for the maximize / restore command buttons.
BorderColorPressedMinimizeCommandButtonGets or sets the border color when in "pressed state" for the minimize command button.
ChromeBorderSizeGets or sets the size of the Window chrome border.
ChromeTitlebarHeightGets or sets the height of the window chrome title bar.
CloseCommandDisabledButtonImageGets or sets the "disabled state" button image for the close command button.
CloseCommandNormalButtonImageGets or sets the "normal state" button image for the close command button.
CloseCommandOnHoverButtonImageGets or sets the "hover state" button image for the close command button.
CloseCommandOnPushedButtonImageGets or sets the "pushed state" button image for the close command button.
ContainerChildGets or sets the main container child.
CreateParamsGets the parameters used to create this control's window, with the window styles this control needs added to them.
DefaultNormalWindowSizeGets or sets the default size of the normal window.
DisplayRectangleThe area inside the window available to its content, which is the client area less the custom chrome this window draws for itself.
EnableMinimizeRestoreActionUponTaskbarIconClickGets or sets a value indicating whether the control should enable the feature of automatically responding to either minimize or restore (as the case may be) upon upon the user clicking on the Window's taskbar icon.
EnableMinimizeRestoreAnimationGets or sets a value indicating whether the control performs animation while the window is being minimized or restored.
ForegroundInternalVisualForDisabledCloseCommandButtonGets or sets the foreground color when in "disabled state" for the internal close command button.
ForegroundInternalVisualForDisabledMaximizeRestoreCommandButtonGets or sets the foreground color when in "disabled state" for the internal maximize / restore command buttons.
ForegroundInternalVisualForDisabledMinimizeCommandButtonGets or sets the foreground color for the internal visual for "disabled state" minimize command button.
ForegroundInternalVisualForHotCloseCommandButtonGets or sets the foreground color when in "hot state" for the internal close command button.
ForegroundInternalVisualForHotMaximizeRestoreCommandButtonGets or sets the foreground color when in "hot state" for the internal maximize / restore command buttons.
ForegroundInternalVisualForHotMinimizeCommandButtonGets or sets the foreground color for the internal visual for "hot state" minimize command button.
ForegroundInternalVisualForNormalCloseCommandButtonGets or sets the foreground color when in "normal state" for the internal close command button.
ForegroundInternalVisualForNormalMaximizeRestoreCommandButtonGets or sets the foreground color when in "normal state" for the internal restore command button.
ForegroundInternalVisualForNormalMinimizeCommandButtonGets or sets the foreground color for the internal visual for "normal state" minimize command button.
ForegroundInternalVisualForPressedCloseCommandButtonGets or sets the foreground color when in "pressed state" for the internal close command button.
ForegroundInternalVisualForPressedMaximizeRestoreCommandButtonGets or sets the foreground color when in "pressed state" for the internal maximize / restore command buttons.
ForegroundInternalVisualForPressedMinimizeCommandButtonGets or sets the foreground color for the internal visual for "pressed state" minimize command button.
FormBorderStyleGets border style of the form.
GapBetweenCommandButtonsGets or sets the gap between window chrome (to-right hand corner) command buttons.
IsBeginResizeMessageRoutedWhether the message that starts a resize has already been passed on, so that a single gesture does not begin the resize twice.
IsBorderDrawnWhenWindowIsMaximisedGets or sets a value indicating whether the control draws the border when it (i.e. window) is currently in maximized mode.
IsCloseBoxVisibleGets or sets whether to show the Close button or not.
IsControlBoxEnabledGets or sets a value indicating whether the control box enabled.
IsDoubleClickOnTitlebarActionResultingInWindowStateChangeEnabledGets or sets a value indicating whether the window state is changed automatically when the user double-clicks on the title bar area.
IsFormBackgroundPaintingInLinearGradientModeEnabledGets or sets a value indicating whether th Form background painting in linear gradient mode is enabled.
IsFullChromeDisabledGets or sets whether to render the Form window without its chrome - i.e. it will render a border (with a customized border size if need be), but with no title bar and window command buttons on it) but at the same time being able to size and/or move the window.
IsLocationAutoResettingAnchoredControlsEnabledGets or sets a value indicating whether the location of the child controls (that are anchored to the form) is automatically reset.
IsTitlebarAndBorderBackgroundTransparentGets or sets a value indicating whether the border background is drawn transparent.
IsTitlebarBackgroundTransparentGets or sets a value indicating whether the title bar background is drawn transparent.
IsWindowControlBoxCommandsAutoCodeExecutionEnabledGets or sets a value indicating whether this component will execute the built-in code to execute when the user clicks on the control-box commands i.e. Minimize, Maximize / Restore and Close button clicks.
IsWindowLockedGets or sets a value indicating whether the window is locked - i.e. user is not allowed to move the window.
IsWindowResizingAllowedGets or sets a value indicating whether the control allows window resizing.
MaximizeCommandDisabledButtonImageGets or sets the "disabled state" button image for the maximize command button.
MaximizeCommandNormalButtonImageGets or sets the "normal state" button image for the maximize command button.
MaximizeCommandOnHoverButtonImageGets or sets the "hover state" button image for the maximize command button.
MaximizeCommandOnPushedButtonImageGets or sets the "pushed state" button image for the maximize command button.
MinimizeCommandDisabledButtonImageGets or sets the "disabled state" button image for the minimize command button.
MinimizeCommandNormalButtonImageGets or sets the "normal state" button image for the minimize command button.
MinimizeCommandOnHoverButtonImageGets or sets the "hover state" button image for the minimize command button.
MinimizeCommandOnPushedButtonImageGets or sets the "pushed state" button image for the minimize command button.
ModernWindowChromeProviderGets or sets an instance of a custom window chrome renderer.
RestoreCommandDisabledButtonImageGets or sets the "disabled state" button image for the restore command button.
RestoreCommandNormalButtonImageGets or sets the "normal state" button image for the restore command button.
RestoreCommandOnHoverButtonImageGets or sets the "hover state" button image for the restore command button.
RestoreCommandOnPushedButtonImageGets or sets the "pushed state" button image for the restore command button.
ShouldAnchorTitlebarChildControlsToRightGets or sets whether the control should automatically right align / right-anchor the TitlebarControls to the maximum allowable X-coordinate of the title bar.
ShouldAutoResizeWindowHeightOnTitlebarHeightChangeGets or sets a value indicating whether the component should automatically resize its window height upon title bar height having been changed.
ShouldAutoResizeWindowSizeOnBorderWidthChangeGets or sets a value indicating whether the component should automatically resize its window height and width upon border width having been changed.
ShouldCycleWindowsHotKeyExecutionWhileWindowsKeyKeptPressedGets or sets a value indicating whether the control should cycle windows hot key execution while windows key is kept pressed.
ShouldDrawBorderForWindowChromeCommandButtonsGets or sets a value indicating whether the component should draw the border for the window chrome command buttons.
ShouldDrawResizeGripperGets or sets a value indicating whether the control should draw resize gripper.
ShouldDrawWindowCommandButtonsOnTopRightEdgeIgnoringBorderSizeWhenInMaximizedModeGets or sets a value indicating whether the control should draw window command buttons on top right edge, ignoring border size when in maximized window state mode.
ShouldDrawWindowEdgesWithRoundedCornersGets or sets a value indicating whether the control should draw window edges with rounded corners.
ShouldEnableContainerChildAutoManagementGets or sets a value indicating whether the control should enable automatic management of the container child control.
ShouldEnableWindowsKeyHooksGets or sets a value indicating whether the control should enable its custom windows key hooks, in order to handle some of the Windows + hotkey keys.
ShouldMaximizedWindowStateCoverTaskbarAreaGets or sets a value indicating whether the Form should cover the task bar area when in maximized window state.
ShouldRefreshChildrenWhenRepaintingNonClientAreaGets or sets a value indicating whether the control should refresh children when repainting its non-client area.
ShouldRefreshClientAreaUponMaximizedWindowStateGets or sets a value indicating whether the control should refresh the client area upon maximized window state.
ShouldRefreshNcAreaWhenInDesignModeGets or sets a value indicating whether the control should refresh its Non-client area when in design mode.
ShouldRefreshNonClientAreaWithDockedChildControlsGets or sets a value indicating whether the control should automatically refresh drawing sections for the non-client area when docked child controls are present in the client area.
ShouldRenderAppIconGets or sets a value indicating whether the control should render application icon.
ShouldRenderAppIconUsingStandardSizeGets or sets a value indicating whether the control should render application icon using standard size.
ShouldRenderAppTitlebarTextGets or sets a value indicating whether the control should render application title bar text.
ShouldRenderWindowCommandButtonsInsideChromeBorderWhenInNormalWindowStateGets or sets a value indicating whether the control should render window command buttons inside the chrome border when in normal window state mode.
ShouldRepaintNonClientAreaWhenWindowIsBeingResizedGets or sets a value indicating whether the control should repaint its non-client area when it (i.e. window) is being resized.
ShouldRunBaseCoreWhether the base window procedure is allowed to run for the message being handled. It is cleared while the window handles a message itself and wants the default handling suppressed.
TitleTextDrawingFormatGets or sets the title text drawing format.
TitlebarControlsGets (and helps set up) the child controls to be hosted on the title bar.
TitlebarControlsHostLocationGets or sets the title bar controls host location in the title bar.
TitlebarControlsHostLocationMaximumXOffsetGets the title bar controls host location maximum X offset.
TitlebarControlsHostLocationMaximumYOffsetGets the title bar controls host location's maximum Y offset.
TitlebarControlsHostMaximumWidthGets the maximum width of the title bar controls host.
TitlebarControlsHostSizeGets or sets the size of the title bar controls host.
TitlebarTextGets or sets the Window title text.
TopMarginForDrawingWindowChromeCommandButtonsGets or sets the top margin for drawing window chrome command buttons.
WindowGets the Window (i.e. ModernChromeWindow instance that hosts the custom drawn and managed chrome.
WindowChromeBorderColorGets or sets the color of the window chrome border.
WindowChromeCommandButtonSizeGets or sets the size of the chrome command buttons.
WindowChromeEndColorGets or sets the end color for drawing the window chrome background fill.
WindowChromeGradientModeGets or sets the window chrome brush drawing gradient mode.
WindowChromeStartColorGets or sets the start color for drawing the window chrome background fill.
WindowChromeThemeGets or sets the window theme.
WindowChromeTitleTextBrushGets or sets the window chrome title text brush.
WindowChromeTitleTextBrushWhenTitlebarBackgroundIsTransparentGets or sets the window chrome title text brush when the title bar background is drawn transparent.
WindowChromeTitleTextFontGets or sets the window chrome title text font.
WindowContextMenuGets or sets the window context menu.
WindowContextMenuCloseCommandImageGets or sets the window context menu close command image.
WindowContextMenuCloseCommandTitleGets or sets the window context menu close command title.
WindowContextMenuMaximizeCommandImageGets or sets the window context menu maximize command image.
WindowContextMenuMaximizeCommandTitleGets or sets the window context menu maximize command title.
WindowContextMenuMinimizeCommandImageGets or sets the window context menu minimize command image.
WindowContextMenuMinimizeCommandTitleGets or sets the window context menu minimize command title.
WindowContextMenuRestoreCommandImageGets or sets the window context menu restore command image.
WindowContextMenuRestoreCommandTitleGets or sets the window context menu restore command title.
WindowDockModeGets the current docking position of the window with rest to the desktop bounds of the current screen.
WindowEdgeCornerRadiusGets or sets the window edge corner radius.
DisposeReleases the resources held by this ModernChromeWindow.
OnActivatedRaises the Activated event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.
OnClientSizeChangedRaises the ClientSizeChanged event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.
OnClosedRaises the Closed event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.
OnClosingRaises the Closing event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.
OnDeactivateRaises the Deactivate event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.
OnDpiChangedRaises the DpiChanged event. ModernChromeWindow overrides it so the chrome is rebuilt for the new scale factor when the window is dragged to another display.
OnFormClosingRaises the FormClosing event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.
OnHandleCreatedRaises the HandleCreated event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.
OnKeyDownRaises the KeyDown event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.
OnKeyUpRaises the KeyUp event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.
OnLoadRaises the Load event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.
OnMouseMoveRaises the MouseMove event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.
OnMouseUpRaises the MouseUp event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.
OnPaintRaises the Paint event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.
OnPaintBackgroundRaises the PaintBackground event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.
OnShownRaises the Shown event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.
OnVisibleChangedRaises the VisibleChanged event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.
PerformExtendedNonClientRefresh// Gets or sets the color of the window chrome title bar border. //
PositionAndSizeWindowSets the window bounds to a deterministic bounds.
ProcessCmdKeyGives this control first sight of a command key, before the menu system and the parent form see it.
RefreshWindowNonClientRefreshes the window non-client area sections.
SetBoundsCoreSets the bounds of this control, applying the constraints it imposes on its own size.
SetClientSizeCoreSets the client size, allowing for the custom chrome, so that asking for a client area of a given size actually yields one.
UpdateWindowTitleTextUpdates the window title text.
WndProcProcesses the Windows messages sent to this control's window.
WindowChromeBorderSizeChangedRaised when the window border size is changed.
WindowChromeThemeChangedOccurs when the window chrome theme changed.
WindowChromeTitlebarHeightChangedRaised when the window title bar height is changed.
WindowCloseRequestedOccurs when window close is requested.
WindowIconClickedOccurs when window icon has been clicked.
WindowMinimizeRequestedOccurs when window minimize is requested.
WindowRestoreOrMaximizeRequestedOccurs when window restore or maximize is requested.
WindowStateChangedOccurs when the window state has changed.

Constructors

ModernChromeWindow

public ModernChromeWindow()

Initializes a new instance of the ModernChromeWindow class.

Properties

AppIconLeftMargin

public int AppIconLeftMargin

Gets or sets the application icon left margin.

Please note that the component allows a maximum of 6 pixels for this property, and also note that this cannot be a negative value too.

BackgroundBrush

public BrushContainer BackgroundBrush

Gets or sets the Form background brush.

BackgroundDisabledCloseCommandButton

public BrushContainer BackgroundDisabledCloseCommandButton

Gets or sets the background brush when in "disabled state" for the internal close command button.

BackgroundDisabledMaximizeRestoreCommandButton

public BrushContainer BackgroundDisabledMaximizeRestoreCommandButton

Gets or sets the background brush for the "disabled state" for drawing the maximize / restore command buttons.

BackgroundDisabledMinimizeCommandButton

public BrushContainer BackgroundDisabledMinimizeCommandButton

Gets or sets the background brush for "disabled state" minimize command button.

BackgroundHotCloseCommandButton

public BrushContainer BackgroundHotCloseCommandButton

Gets or sets the background brush when in "hot state" for the internal close command button.

BackgroundHotMaximizeRestoreCommandButton

public BrushContainer BackgroundHotMaximizeRestoreCommandButton

Gets or sets the background brush for the "hot state" for drawing the maximize / restore command buttons.

BackgroundHotMinimizeCommandButton

public BrushContainer BackgroundHotMinimizeCommandButton

Gets or sets the background brush for "hot state" minimize command button.

BackgroundNormalCloseCommandButton

public BrushContainer BackgroundNormalCloseCommandButton

Gets or sets the background brush when in "normal state" for the internal close command button.

BackgroundNormalMaximizeRestoreCommandButton

public BrushContainer BackgroundNormalMaximizeRestoreCommandButton

Gets or sets the background brush for the "normal state" for drawing the maximize / restore command buttons.

BackgroundNormalMinimizeCommandButton

public BrushContainer BackgroundNormalMinimizeCommandButton

Gets or sets the background brush for "normal state" minimize command button.

BackgroundPressedCloseCommandButton

public BrushContainer BackgroundPressedCloseCommandButton

Gets or sets the background brush when in "pressed state" for the internal close command button.

BackgroundPressedMaximizeRestoreCommandButton

public BrushContainer BackgroundPressedMaximizeRestoreCommandButton

Gets or sets the background brush for the "pressed state" for drawing the maximize / restore command buttons.

BackgroundPressedMinimizeCommandButton

public BrushContainer BackgroundPressedMinimizeCommandButton

Gets or sets the background brush for "pressed state" minimize command button.

BorderColorDisabledCloseCommandButton

public Color BorderColorDisabledCloseCommandButton

Gets or sets the border color when in "disabled state" for the close command button.

BorderColorDisabledMaximiseRestoreCommandButton

public Color BorderColorDisabledMaximiseRestoreCommandButton

Gets or sets the border color when in "disabled state" for the maximize/restore command buttons.

BorderColorDisabledMinimizeCommandButton

public Color BorderColorDisabledMinimizeCommandButton

Gets or sets the border color when in "disabled state" for the minimize command button.

BorderColorHotCloseCommandButton

public Color BorderColorHotCloseCommandButton

Gets or sets the border color when in "hot state" for the close command button.

BorderColorHotMaximiseRestoreCommandButton

public Color BorderColorHotMaximiseRestoreCommandButton

Gets or sets the border color when in "hot state" for the maximize / restore command buttons.

BorderColorHotMinimizeCommandButton

public Color BorderColorHotMinimizeCommandButton

Gets or sets the border color when in "hot state" for the minimize command button.

BorderColorNormalCloseCommandButton

public Color BorderColorNormalCloseCommandButton

Gets or sets the border color when in "normal state" for the close command button.

BorderColorNormalMaximiseRestoreCommandButton

public Color BorderColorNormalMaximiseRestoreCommandButton

Gets or sets the border color when in "normal state" for the maximize/restore command buttons.

BorderColorNormalMinimizeCommandButton

public Color BorderColorNormalMinimizeCommandButton

Gets or sets the border color when in "normal state" for the minimize command button.

BorderColorPressedCloseCommandButton

public Color BorderColorPressedCloseCommandButton

Gets or sets the border color when in "pressed state" for the close command button.

BorderColorPressedMaximiseRestoreCommandButton

public Color BorderColorPressedMaximiseRestoreCommandButton

Gets or sets the border color when in "pressed state" for the maximize / restore command buttons.

BorderColorPressedMinimizeCommandButton

public Color BorderColorPressedMinimizeCommandButton

Gets or sets the border color when in "pressed state" for the minimize command button.

ChromeBorderSize

public int ChromeBorderSize

Gets or sets the size of the Window chrome border.

ChromeTitlebarHeight

public int ChromeTitlebarHeight

Gets or sets the height of the window chrome title bar.

CloseCommandDisabledButtonImage

public Bitmap CloseCommandDisabledButtonImage

Gets or sets the "disabled state" button image for the close command button.

CloseCommandNormalButtonImage

public Bitmap CloseCommandNormalButtonImage

Gets or sets the "normal state" button image for the close command button.

CloseCommandOnHoverButtonImage

public Bitmap CloseCommandOnHoverButtonImage

Gets or sets the "hover state" button image for the close command button.

CloseCommandOnPushedButtonImage

public Bitmap CloseCommandOnPushedButtonImage

Gets or sets the "pushed state" button image for the close command button.

ContainerChild

public Panel ContainerChild

Gets or sets the main container child.

Value. The main container child.

CreateParams

protected override CreateParams CreateParams

Gets the parameters used to create this control's window, with the window styles this control needs added to them.

DefaultNormalWindowSize

public Size DefaultNormalWindowSize

Gets or sets the default size of the normal window.

Value. The default size of the normal window.

DisplayRectangle

public override Rectangle DisplayRectangle

The area inside the window available to its content, which is the client area less the custom chrome this window draws for itself.

EnableMinimizeRestoreActionUponTaskbarIconClick

public bool EnableMinimizeRestoreActionUponTaskbarIconClick

Gets or sets a value indicating whether the control should enable the feature of automatically responding to either minimize or restore (as the case may be) upon upon the user clicking on the Window's taskbar icon.

This property is designed to be used one time only, i.e. at design-time, before the window handle is created.
Do not try to update the value of this property after the window's handle creation - and never use it during run-time.

EnableMinimizeRestoreAnimation

public bool EnableMinimizeRestoreAnimation

Gets or sets a value indicating whether the control performs animation while the window is being minimized or restored.

This property is designed to be used one time only, i.e. at design-time, before the window handle is created.
Do not try to update the value of this property after the window's handle creation - and never use it during run-time.

ForegroundInternalVisualForDisabledCloseCommandButton

public Color ForegroundInternalVisualForDisabledCloseCommandButton

Gets or sets the foreground color when in "disabled state" for the internal close command button.

ForegroundInternalVisualForDisabledMaximizeRestoreCommandButton

public Color ForegroundInternalVisualForDisabledMaximizeRestoreCommandButton

Gets or sets the foreground color when in "disabled state" for the internal maximize / restore command buttons.

ForegroundInternalVisualForDisabledMinimizeCommandButton

public Color ForegroundInternalVisualForDisabledMinimizeCommandButton

Gets or sets the foreground color for the internal visual for "disabled state" minimize command button.

ForegroundInternalVisualForHotCloseCommandButton

public Color ForegroundInternalVisualForHotCloseCommandButton

Gets or sets the foreground color when in "hot state" for the internal close command button.

ForegroundInternalVisualForHotMaximizeRestoreCommandButton

public Color ForegroundInternalVisualForHotMaximizeRestoreCommandButton

Gets or sets the foreground color when in "hot state" for the internal maximize / restore command buttons.

ForegroundInternalVisualForHotMinimizeCommandButton

public Color ForegroundInternalVisualForHotMinimizeCommandButton

Gets or sets the foreground color for the internal visual for "hot state" minimize command button.

ForegroundInternalVisualForNormalCloseCommandButton

public Color ForegroundInternalVisualForNormalCloseCommandButton

Gets or sets the foreground color when in "normal state" for the internal close command button.

ForegroundInternalVisualForNormalMaximizeRestoreCommandButton

public Color ForegroundInternalVisualForNormalMaximizeRestoreCommandButton

Gets or sets the foreground color when in "normal state" for the internal restore command button.

ForegroundInternalVisualForNormalMinimizeCommandButton

public Color ForegroundInternalVisualForNormalMinimizeCommandButton

Gets or sets the foreground color for the internal visual for "normal state" minimize command button.

ForegroundInternalVisualForPressedCloseCommandButton

public Color ForegroundInternalVisualForPressedCloseCommandButton

Gets or sets the foreground color when in "pressed state" for the internal close command button.

ForegroundInternalVisualForPressedMaximizeRestoreCommandButton

public Color ForegroundInternalVisualForPressedMaximizeRestoreCommandButton

Gets or sets the foreground color when in "pressed state" for the internal maximize / restore command buttons.

ForegroundInternalVisualForPressedMinimizeCommandButton

public Color ForegroundInternalVisualForPressedMinimizeCommandButton

Gets or sets the foreground color for the internal visual for "pressed state" minimize command button.

FormBorderStyle

public new FormBorderStyle FormBorderStyle

Gets border style of the form.

GapBetweenCommandButtons

public int GapBetweenCommandButtons

Gets or sets the gap between window chrome (to-right hand corner) command buttons.

IsBeginResizeMessageRouted

public bool IsBeginResizeMessageRouted

Whether the message that starts a resize has already been passed on, so that a single gesture does not begin the resize twice.

IsBorderDrawnWhenWindowIsMaximised

public bool IsBorderDrawnWhenWindowIsMaximised

Gets or sets a value indicating whether the control draws the border when it (i.e. window) is currently in maximized mode.

IsCloseBoxVisible

public bool IsCloseBoxVisible

Gets or sets whether to show the Close button or not.

By default, the property value is true. Important: Note that if this property is set to false - i.e. you switch-off displaying the close control box, the component will make the maximize/restore and minimize buttons to invisible as well.

IsControlBoxEnabled

public bool IsControlBoxEnabled

Gets or sets a value indicating whether the control box enabled.

IsDoubleClickOnTitlebarActionResultingInWindowStateChangeEnabled

public bool IsDoubleClickOnTitlebarActionResultingInWindowStateChangeEnabled

Gets or sets a value indicating whether the window state is changed automatically when the user double-clicks on the title bar area.

IsFormBackgroundPaintingInLinearGradientModeEnabled

public bool IsFormBackgroundPaintingInLinearGradientModeEnabled

Gets or sets a value indicating whether th Form background painting in linear gradient mode is enabled.

If you set this property to true, you can set the BackgroundBrush property to a custom Brush instance, and the component will paint the background using that brush.

IsFullChromeDisabled

public bool IsFullChromeDisabled

Gets or sets whether to render the Form window without its chrome - i.e. it will render a border (with a customized border size if need be), but with no title bar and window command buttons on it) but at the same time being able to size and/or move the window.

IsLocationAutoResettingAnchoredControlsEnabled

public bool IsLocationAutoResettingAnchoredControlsEnabled

Gets or sets a value indicating whether the location of the child controls (that are anchored to the form) is automatically reset.

IsTitlebarAndBorderBackgroundTransparent

public bool IsTitlebarAndBorderBackgroundTransparent

Gets or sets a value indicating whether the border background is drawn transparent.

IsTitlebarBackgroundTransparent

public bool IsTitlebarBackgroundTransparent

Gets or sets a value indicating whether the title bar background is drawn transparent.

IsWindowControlBoxCommandsAutoCodeExecutionEnabled

public bool IsWindowControlBoxCommandsAutoCodeExecutionEnabled

Gets or sets a value indicating whether this component will execute the built-in code to execute when the user clicks on the control-box commands i.e. Minimize, Maximize / Restore and Close button clicks.

IsWindowLocked

public bool IsWindowLocked

Gets or sets a value indicating whether the window is locked - i.e. user is not allowed to move the window.

IsWindowResizingAllowed

public bool IsWindowResizingAllowed

Gets or sets a value indicating whether the control allows window resizing.

MaximizeCommandDisabledButtonImage

public Bitmap MaximizeCommandDisabledButtonImage

Gets or sets the "disabled state" button image for the maximize command button.

MaximizeCommandNormalButtonImage

public Bitmap MaximizeCommandNormalButtonImage

Gets or sets the "normal state" button image for the maximize command button.

MaximizeCommandOnHoverButtonImage

public Bitmap MaximizeCommandOnHoverButtonImage

Gets or sets the "hover state" button image for the maximize command button.

MaximizeCommandOnPushedButtonImage

public Bitmap MaximizeCommandOnPushedButtonImage

Gets or sets the "pushed state" button image for the maximize command button.

MinimizeCommandDisabledButtonImage

public Bitmap MinimizeCommandDisabledButtonImage

Gets or sets the "disabled state" button image for the minimize command button.

MinimizeCommandNormalButtonImage

public Bitmap MinimizeCommandNormalButtonImage

Gets or sets the "normal state" button image for the minimize command button.

MinimizeCommandOnHoverButtonImage

public Bitmap MinimizeCommandOnHoverButtonImage

Gets or sets the "hover state" button image for the minimize command button.

MinimizeCommandOnPushedButtonImage

public Bitmap MinimizeCommandOnPushedButtonImage

Gets or sets the "pushed state" button image for the minimize command button.

ModernWindowChromeProvider

public IModernWindowChromeProvider ModernWindowChromeProvider

Gets or sets an instance of a custom window chrome renderer.

Value. The window chrome renderer.

Set this property with a instance of a custom implementation of the interface IModernWindowChromeProvider.
Once this is set, the component will draw the chrome border and its contents (title bar, command buttons etc.) as may be drawn by the custom implementation.
The component will raise events whenever there are any "non-client area" events that needs propagating to the custom implementation so that it can handle it to respond to actions such as clicking a button, etc.

RestoreCommandDisabledButtonImage

public Bitmap RestoreCommandDisabledButtonImage

Gets or sets the "disabled state" button image for the restore command button.

RestoreCommandNormalButtonImage

public Bitmap RestoreCommandNormalButtonImage

Gets or sets the "normal state" button image for the restore command button.

RestoreCommandOnHoverButtonImage

public Bitmap RestoreCommandOnHoverButtonImage

Gets or sets the "hover state" button image for the restore command button.

RestoreCommandOnPushedButtonImage

public Bitmap RestoreCommandOnPushedButtonImage

Gets or sets the "pushed state" button image for the restore command button.

ShouldAnchorTitlebarChildControlsToRight

public bool ShouldAnchorTitlebarChildControlsToRight

Gets or sets whether the control should automatically right align / right-anchor the TitlebarControls to the maximum allowable X-coordinate of the title bar.

ShouldAutoResizeWindowHeightOnTitlebarHeightChange

public bool ShouldAutoResizeWindowHeightOnTitlebarHeightChange

Gets or sets a value indicating whether the component should automatically resize its window height upon title bar height having been changed.

ShouldAutoResizeWindowSizeOnBorderWidthChange

public bool ShouldAutoResizeWindowSizeOnBorderWidthChange

Gets or sets a value indicating whether the component should automatically resize its window height and width upon border width having been changed.

ShouldCycleWindowsHotKeyExecutionWhileWindowsKeyKeptPressed

public bool ShouldCycleWindowsHotKeyExecutionWhileWindowsKeyKeptPressed

Gets or sets a value indicating whether the control should cycle windows hot key execution while windows key is kept pressed.

ShouldDrawBorderForWindowChromeCommandButtons

public bool ShouldDrawBorderForWindowChromeCommandButtons

Gets or sets a value indicating whether the component should draw the border for the window chrome command buttons.

ShouldDrawResizeGripper

public bool ShouldDrawResizeGripper

Gets or sets a value indicating whether the control should draw resize gripper.

ShouldDrawWindowCommandButtonsOnTopRightEdgeIgnoringBorderSizeWhenInMaximizedMode

public bool ShouldDrawWindowCommandButtonsOnTopRightEdgeIgnoringBorderSizeWhenInMaximizedMode

Gets or sets a value indicating whether the control should draw window command buttons on top right edge, ignoring border size when in maximized window state mode.

ShouldDrawWindowEdgesWithRoundedCorners

public bool ShouldDrawWindowEdgesWithRoundedCorners

Gets or sets a value indicating whether the control should draw window edges with rounded corners.

ShouldEnableContainerChildAutoManagement

public bool ShouldEnableContainerChildAutoManagement

Gets or sets a value indicating whether the control should enable automatic management of the container child control.

ShouldEnableWindowsKeyHooks

public bool ShouldEnableWindowsKeyHooks

Gets or sets a value indicating whether the control should enable its custom windows key hooks, in order to handle some of the Windows + hotkey keys.

ShouldMaximizedWindowStateCoverTaskbarArea

public bool ShouldMaximizedWindowStateCoverTaskbarArea

Gets or sets a value indicating whether the Form should cover the task bar area when in maximized window state.

ShouldRefreshChildrenWhenRepaintingNonClientArea

public bool ShouldRefreshChildrenWhenRepaintingNonClientArea

Gets or sets a value indicating whether the control should refresh children when repainting its non-client area.

ShouldRefreshClientAreaUponMaximizedWindowState

public bool ShouldRefreshClientAreaUponMaximizedWindowState

Gets or sets a value indicating whether the control should refresh the client area upon maximized window state.

ShouldRefreshNcAreaWhenInDesignMode

public bool ShouldRefreshNcAreaWhenInDesignMode

Gets or sets a value indicating whether the control should refresh its Non-client area when in design mode.

ShouldRefreshNonClientAreaWithDockedChildControls

public bool ShouldRefreshNonClientAreaWithDockedChildControls

Gets or sets a value indicating whether the control should automatically refresh drawing sections for the non-client area when docked child controls are present in the client area.

ShouldRenderAppIcon

public bool ShouldRenderAppIcon

Gets or sets a value indicating whether the control should render application icon.

ShouldRenderAppIconUsingStandardSize

public bool ShouldRenderAppIconUsingStandardSize

Gets or sets a value indicating whether the control should render application icon using standard size.

ShouldRenderAppTitlebarText

public bool ShouldRenderAppTitlebarText

Gets or sets a value indicating whether the control should render application title bar text.

ShouldRenderWindowCommandButtonsInsideChromeBorderWhenInNormalWindowState

public bool ShouldRenderWindowCommandButtonsInsideChromeBorderWhenInNormalWindowState

Gets or sets a value indicating whether the control should render window command buttons inside the chrome border when in normal window state mode.

ShouldRepaintNonClientAreaWhenWindowIsBeingResized

public bool ShouldRepaintNonClientAreaWhenWindowIsBeingResized

Gets or sets a value indicating whether the control should repaint its non-client area when it (i.e. window) is being resized.

ShouldRunBaseCore

public bool ShouldRunBaseCore

Whether the base window procedure is allowed to run for the message being handled. It is cleared while the window handles a message itself and wants the default handling suppressed.

TitleTextDrawingFormat

public StringFormat TitleTextDrawingFormat

Gets or sets the title text drawing format.

Value. The title text drawing format.

TitlebarControls

public Control.ControlCollection TitlebarControls

Gets (and helps set up) the child controls to be hosted on the title bar.

TitlebarControlsHostLocation

public Point TitlebarControlsHostLocation

Gets or sets the title bar controls host location in the title bar.

TitlebarControlsHostLocationMaximumXOffset

public int TitlebarControlsHostLocationMaximumXOffset

Gets the title bar controls host location maximum X offset.

TitlebarControlsHostLocationMaximumYOffset

public int TitlebarControlsHostLocationMaximumYOffset

Gets the title bar controls host location's maximum Y offset.

TitlebarControlsHostMaximumWidth

public int TitlebarControlsHostMaximumWidth

Gets the maximum width of the title bar controls host.

TitlebarControlsHostSize

public Size TitlebarControlsHostSize

Gets or sets the size of the title bar controls host.

TitlebarText

public new string TitlebarText

Gets or sets the Window title text.

TopMarginForDrawingWindowChromeCommandButtons

public int TopMarginForDrawingWindowChromeCommandButtons

Gets or sets the top margin for drawing window chrome command buttons.

Window

public ModernChromeWindow Window

Gets the Window (i.e. ModernChromeWindow instance that hosts the custom drawn and managed chrome.

WindowChromeBorderColor

public Color WindowChromeBorderColor

Gets or sets the color of the window chrome border.

WindowChromeCommandButtonSize

public Size WindowChromeCommandButtonSize

Gets or sets the size of the chrome command buttons.

WindowChromeEndColor

public Color WindowChromeEndColor

Gets or sets the end color for drawing the window chrome background fill.

WindowChromeGradientMode

public LinearGradientMode WindowChromeGradientMode

Gets or sets the window chrome brush drawing gradient mode.

WindowChromeStartColor

public Color WindowChromeStartColor

Gets or sets the start color for drawing the window chrome background fill.

WindowChromeTheme

public WindowChromeTheme WindowChromeTheme

Gets or sets the window theme.

WindowChromeTitleTextBrush

public BrushContainer WindowChromeTitleTextBrush

Gets or sets the window chrome title text brush.

WindowChromeTitleTextBrushWhenTitlebarBackgroundIsTransparent

public BrushContainer WindowChromeTitleTextBrushWhenTitlebarBackgroundIsTransparent

Gets or sets the window chrome title text brush when the title bar background is drawn transparent.

Window title bar is drawn transparent when you set the property IsTitlebarBackgroundTransparent to true.

WindowChromeTitleTextFont

public Font WindowChromeTitleTextFont

Gets or sets the window chrome title text font.

WindowContextMenu

public ContextMenuStrip WindowContextMenu

Gets or sets the window context menu.

WindowContextMenuCloseCommandImage

public Image WindowContextMenuCloseCommandImage

Gets or sets the window context menu close command image.

WindowContextMenuCloseCommandTitle

public string WindowContextMenuCloseCommandTitle

Gets or sets the window context menu close command title.

WindowContextMenuMaximizeCommandImage

public Image WindowContextMenuMaximizeCommandImage

Gets or sets the window context menu maximize command image.

WindowContextMenuMaximizeCommandTitle

public string WindowContextMenuMaximizeCommandTitle

Gets or sets the window context menu maximize command title.

WindowContextMenuMinimizeCommandImage

public Image WindowContextMenuMinimizeCommandImage

Gets or sets the window context menu minimize command image.

WindowContextMenuMinimizeCommandTitle

public string WindowContextMenuMinimizeCommandTitle

Gets or sets the window context menu minimize command title.

WindowContextMenuRestoreCommandImage

public Image WindowContextMenuRestoreCommandImage

Gets or sets the window context menu restore command image.

WindowContextMenuRestoreCommandTitle

public string WindowContextMenuRestoreCommandTitle

Gets or sets the window context menu restore command title.

WindowDockMode

public DesktopDockMode WindowDockMode

Gets the current docking position of the window with rest to the desktop bounds of the current screen.

WindowEdgeCornerRadius

public WindowEdgeCornerRadius WindowEdgeCornerRadius

Gets or sets the window edge corner radius.

Methods

Dispose

protected override void Dispose(bool disposing)

Releases the resources held by this ModernChromeWindow.

disposing
true when called from Dispose; false when called from the finalizer.

OnActivated

protected override void OnActivated(EventArgs e)

Raises the Activated event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnClientSizeChanged

protected override void OnClientSizeChanged(EventArgs e)

Raises the ClientSizeChanged event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnClosed

protected override void OnClosed(EventArgs e)

Raises the Closed event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnClosing

protected override void OnClosing(CancelEventArgs e)

Raises the Closing event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnDeactivate

protected override void OnDeactivate(EventArgs e)

Raises the Deactivate event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnDpiChanged

protected override void OnDpiChanged(DpiChangedEventArgs e)

Raises the DpiChanged event. ModernChromeWindow overrides it so the chrome is rebuilt for the new scale factor when the window is dragged to another display.

e
The event data.
The built-in command button glyphs are cached as bitmaps sized for the display they were drawn on, so they are dropped here and rebuilt on the next non-client paint.

OnFormClosing

protected override void OnFormClosing(FormClosingEventArgs e)

Raises the FormClosing event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnHandleCreated

protected override void OnHandleCreated(EventArgs e)

Raises the HandleCreated event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnKeyDown

protected override void OnKeyDown(KeyEventArgs e)

Raises the KeyDown event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnKeyUp

protected override void OnKeyUp(KeyEventArgs e)

Raises the KeyUp event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnLoad

protected override void OnLoad(EventArgs e)

Raises the Load event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnMouseMove

protected override void OnMouseMove(MouseEventArgs e)

Raises the MouseMove event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnMouseUp

protected override void OnMouseUp(MouseEventArgs e)

Raises the MouseUp event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnPaint

protected override void OnPaint(PaintEventArgs e)

Raises the Paint event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnPaintBackground

protected override void OnPaintBackground(PaintEventArgs e)

Raises the PaintBackground event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnShown

protected override void OnShown(EventArgs e)

Raises the Shown event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnVisibleChanged

protected override void OnVisibleChanged(EventArgs e)

Raises the VisibleChanged event. ModernChromeWindow overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

PerformExtendedNonClientRefresh

public void PerformExtendedNonClientRefresh()

// Gets or sets the color of the window chrome title bar border. //

PositionAndSizeWindow

public void PositionAndSizeWindow(int left, int top, int width, int height, bool performActionNow

Sets the window bounds to a deterministic bounds.

left
The left location point.
top
The top location point.
width
The form width.
height
The form height.
performActionNow
The request will try to instantly perform the action rather than store the details and perform it once the form/window has been successfully shown.

ProcessCmdKey

protected override bool ProcessCmdKey(ref Message msg, Keys keyData)

Gives this control first sight of a command key, before the menu system and the parent form see it.

RefreshWindowNonClient

public void RefreshWindowNonClient(bool shouldPerformExtendedRefresh

Refreshes the window non-client area sections.

shouldPerformExtendedRefresh
if set to true the control will perform a slightly time consuming extended refresh.

SetBoundsCore

protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)

Sets the bounds of this control, applying the constraints it imposes on its own size.

SetClientSizeCore

protected override void SetClientSizeCore(int x, int y)

Sets the client size, allowing for the custom chrome, so that asking for a client area of a given size actually yields one.

x
The requested client width.
y
The requested client height.

UpdateWindowTitleText

public void UpdateWindowTitleText(string titlebarText)

Updates the window title text.

titlebarText
The titlebar text.

WndProc

protected override void WndProc(ref Message m)

Processes the Windows messages sent to this control's window.

Events

WindowChromeBorderSizeChanged

public event EventHandler<WindowChromeTitlebarHeightChangedEventArgs> WindowChromeBorderSizeChanged

Raised when the window border size is changed.

WindowChromeThemeChanged

public event EventHandler<WindowChromeThemeChangedEventArgs> WindowChromeThemeChanged

Occurs when the window chrome theme changed.

WindowChromeTitlebarHeightChanged

public event EventHandler<WindowChromeTitlebarHeightChangedEventArgs> WindowChromeTitlebarHeightChanged

Raised when the window title bar height is changed.

WindowCloseRequested

public event EventHandler WindowCloseRequested

Occurs when window close is requested.

WindowIconClicked

public event EventHandler<WindowIconClickEventArgs> WindowIconClicked

Occurs when window icon has been clicked.

WindowMinimizeRequested

public event EventHandler WindowMinimizeRequested

Occurs when window minimize is requested.

WindowRestoreOrMaximizeRequested

public event EventHandler WindowRestoreOrMaximizeRequested

Occurs when window restore or maximize is requested.

WindowStateChanged

public event EventHandler<WindowStateChangedEventArgs> WindowStateChanged

Occurs when the window state has changed.