C# Class ModernWPF.Chrome

Attached property class for making a Window modern.
Inheritance: System.Windows.Freezable
Show file Open project: soukoku/ModernWPF Class Usage Examples

Public Properties

Property Type Description
ActiveBorderBrushProperty System.Windows.DependencyProperty
ActiveCaptionBrushProperty System.Windows.DependencyProperty
ActiveCaptionForegroundProperty System.Windows.DependencyProperty
CaptionExtraContentProperty System.Windows.DependencyProperty
CaptionHeightProperty System.Windows.DependencyProperty
ChromeProperty System.Windows.DependencyProperty
InactiveBorderBrushProperty System.Windows.DependencyProperty
InactiveCaptionBrushProperty System.Windows.DependencyProperty
InactiveCaptionForegroundProperty System.Windows.DependencyProperty
IsCaptionProperty System.Windows.DependencyProperty
IsHitTestVisibleProperty System.Windows.DependencyProperty
ResizeBorderThicknessProperty System.Windows.DependencyProperty
ShowCaptionIconProperty System.Windows.DependencyProperty
ShowCaptionTextProperty System.Windows.DependencyProperty
ShowControlBoxesProperty System.Windows.DependencyProperty

Private Properties

Property Type Description
ChromeChanged void
GetChrome Chrome
SetChrome void

Public Methods

Method Description
GetCaptionExtraContent ( Window window ) : object

Gets the extra content on the caption area.

GetCaptionHeight ( DependencyObject obj ) : double

Gets the height of the window caption area.

GetIsCaption ( IInputElement inputElement ) : bool

Gets the IsCaption value.

GetIsHitTestVisible ( IInputElement inputElement ) : bool

Gets the IsHitTestVisible property for the element.

GetShowCaptionIcon ( DependencyObject obj ) : bool

Gets the value indicating whether to show caption icon on the window.

GetShowCaptionText ( DependencyObject obj ) : bool

Gets the value indicating whether to show caption text on the window.

GetShowControlBoxes ( DependencyObject obj ) : bool

Gets whether to show control boxes in ModernWindow style.

SetCaptionExtraContent ( Window window, object value ) : void

Sets the extra content on the caption area.

SetCaptionHeight ( DependencyObject obj, double value ) : void

Sets the height of the window caption area.

SetIsCaption ( IInputElement inputElement, bool isCaption ) : void

Sets the IsCaption value.

SetIsHitTestVisible ( IInputElement inputElement, bool hitTestVisible ) : void

Sets the IsHitTestVisible property for the element.

SetShowCaptionIcon ( DependencyObject obj, bool value ) : void

Sets the value indicating whether to show caption text on the window.

SetShowCaptionText ( DependencyObject obj, bool value ) : void

Gets the value indicating whether to show caption text on the window.

SetShowControlBoxes ( DependencyObject obj, bool value ) : void

Sets whether to show control boxes.

Protected Methods

Method Description
CreateInstanceCore ( ) : System.Windows.Freezable

When implemented in a derived class, creates a new instance of the T:System.Windows.Freezable derived class.

Private Methods

Method Description
ChromeChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
GetChrome ( Window window ) : Chrome
SetChrome ( Window window, Chrome chrome ) : void

Method Details

CreateInstanceCore() protected method

When implemented in a derived class, creates a new instance of the T:System.Windows.Freezable derived class.
protected CreateInstanceCore ( ) : System.Windows.Freezable
return System.Windows.Freezable

GetCaptionExtraContent() public static method

Gets the extra content on the caption area.
public static GetCaptionExtraContent ( Window window ) : object
window System.Windows.Window The object.
return object

GetCaptionHeight() public static method

Gets the height of the window caption area.
public static GetCaptionHeight ( DependencyObject obj ) : double
obj System.Windows.DependencyObject The object.
return double

GetIsCaption() public static method

Gets the IsCaption value.
public static GetIsCaption ( IInputElement inputElement ) : bool
inputElement IInputElement The input element.
return bool

GetIsHitTestVisible() public static method

Gets the IsHitTestVisible property for the element.
public static GetIsHitTestVisible ( IInputElement inputElement ) : bool
inputElement IInputElement The input element.
return bool

GetShowCaptionIcon() public static method

Gets the value indicating whether to show caption icon on the window.
public static GetShowCaptionIcon ( DependencyObject obj ) : bool
obj System.Windows.DependencyObject The object.
return bool

GetShowCaptionText() public static method

Gets the value indicating whether to show caption text on the window.
public static GetShowCaptionText ( DependencyObject obj ) : bool
obj System.Windows.DependencyObject The object.
return bool

GetShowControlBoxes() public static method

Gets whether to show control boxes in ModernWindow style.
public static GetShowControlBoxes ( DependencyObject obj ) : bool
obj System.Windows.DependencyObject The object.
return bool

SetCaptionExtraContent() public static method

Sets the extra content on the caption area.
public static SetCaptionExtraContent ( Window window, object value ) : void
window System.Windows.Window The object.
value object The value.
return void

SetCaptionHeight() public static method

Sets the height of the window caption area.
public static SetCaptionHeight ( DependencyObject obj, double value ) : void
obj System.Windows.DependencyObject The object.
value double The value.
return void

SetIsCaption() public static method

Sets the IsCaption value.
public static SetIsCaption ( IInputElement inputElement, bool isCaption ) : void
inputElement IInputElement The input element.
isCaption bool if set to true then the element is hit test visible as caption.
return void

SetIsHitTestVisible() public static method

Sets the IsHitTestVisible property for the element.
public static SetIsHitTestVisible ( IInputElement inputElement, bool hitTestVisible ) : void
inputElement IInputElement The input element.
hitTestVisible bool if set to true then the element is hit test visible in chrome.
return void

SetShowCaptionIcon() public static method

Sets the value indicating whether to show caption text on the window.
public static SetShowCaptionIcon ( DependencyObject obj, bool value ) : void
obj System.Windows.DependencyObject The object.
value bool if set to true [value].
return void

SetShowCaptionText() public static method

Gets the value indicating whether to show caption text on the window.
public static SetShowCaptionText ( DependencyObject obj, bool value ) : void
obj System.Windows.DependencyObject The object.
value bool if set to true then show window title.
return void

SetShowControlBoxes() public static method

Sets whether to show control boxes.
public static SetShowControlBoxes ( DependencyObject obj, bool value ) : void
obj System.Windows.DependencyObject The object.
value bool if set to true then show the control boxes.
return void

Property Details

ActiveBorderBrushProperty public static property

The dependency property for ActiveBorderBrush.
public static DependencyProperty,System.Windows ActiveBorderBrushProperty
return System.Windows.DependencyProperty

ActiveCaptionBrushProperty public static property

The dependency property for ActiveCaptionBrush.
public static DependencyProperty,System.Windows ActiveCaptionBrushProperty
return System.Windows.DependencyProperty

ActiveCaptionForegroundProperty public static property

The dependency property for ActiveCaptionForeground.
public static DependencyProperty,System.Windows ActiveCaptionForegroundProperty
return System.Windows.DependencyProperty

CaptionExtraContentProperty public static property

The dependency property for CaptionExtraContent.
public static DependencyProperty,System.Windows CaptionExtraContentProperty
return System.Windows.DependencyProperty

CaptionHeightProperty public static property

The dependency property for CaptionHeight.
public static DependencyProperty,System.Windows CaptionHeightProperty
return System.Windows.DependencyProperty

ChromeProperty public static property

The modern chrome attached property.
public static DependencyProperty,System.Windows ChromeProperty
return System.Windows.DependencyProperty

InactiveBorderBrushProperty public static property

The dependency property for InactiveBorderBrush.
public static DependencyProperty,System.Windows InactiveBorderBrushProperty
return System.Windows.DependencyProperty

InactiveCaptionBrushProperty public static property

The dependency property for InactiveCaptionBrush.
public static DependencyProperty,System.Windows InactiveCaptionBrushProperty
return System.Windows.DependencyProperty

InactiveCaptionForegroundProperty public static property

The dependency property for InactiveCaptionForeground.
public static DependencyProperty,System.Windows InactiveCaptionForegroundProperty
return System.Windows.DependencyProperty

IsCaptionProperty public static property

Attached property to mark a UI element as caption during hit-tests.
public static DependencyProperty,System.Windows IsCaptionProperty
return System.Windows.DependencyProperty

IsHitTestVisibleProperty public static property

Attached property to mark a UI element as hit-testable when in the window caption area.
public static DependencyProperty,System.Windows IsHitTestVisibleProperty
return System.Windows.DependencyProperty

ResizeBorderThicknessProperty public static property

The dependency property for ResizeBorderThickness.
public static DependencyProperty,System.Windows ResizeBorderThicknessProperty
return System.Windows.DependencyProperty

ShowCaptionIconProperty public static property

The dependency property for ShowCaptionIcon.
public static DependencyProperty,System.Windows ShowCaptionIconProperty
return System.Windows.DependencyProperty

ShowCaptionTextProperty public static property

The dependency property for ShowCaptionText.
public static DependencyProperty,System.Windows ShowCaptionTextProperty
return System.Windows.DependencyProperty

ShowControlBoxesProperty public static property

The dependency property for ShowControlBoxes.
public static DependencyProperty,System.Windows ShowControlBoxesProperty
return System.Windows.DependencyProperty