Skip to main content

WindowDrawnDecorations Class

Definition

Assembly:Avalonia.Controls
Package:Avalonia

Manages client-side window decorations (app-drawn window frame). This is a logical element that holds the decorations template and properties. TopLevelHost extracts overlay/underlay/popover visuals from the template content and inserts them into its own visual tree.

public class WindowDrawnDecorations

Inheritance: object -> AvaloniaObject -> Animatable -> StyledElement -> WindowDrawnDecorations

Constructors

NameDescription
WindowDrawnDecorationsNo summary available.

WindowDrawnDecorations Constructor

public WindowDrawnDecorations()

Methods

NameDescription
ApplyStylingApplies styling to the control if the control is initialized and styling is not already applied. Inherited from StyledElement.
BeginInitInherited from StyledElement.
EndInitInherited from StyledElement.
TryGetResourceInherited from StyledElement.
Bind (8 overloads)Binds a Avalonia.AvaloniaProperty to an Avalonia.Data.BindingBase. Inherited from AvaloniaObject.
CheckAccessReturns a value indicating whether the current thread is the UI thread. Inherited from AvaloniaObject.
ClearValue (4 overloads)Clears a Avalonia.AvaloniaProperty's local value. Inherited from AvaloniaObject.
CoerceValueCoerces the specified Avalonia.AvaloniaProperty. Inherited from AvaloniaObject.
EqualsCompares two objects using reference equality. Inherited from AvaloniaObject.
GetBaseValueInherited from AvaloniaObject.
GetHashCodeGets the hash code for the object. Inherited from AvaloniaObject.
GetValue (3 overloads)Gets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject.
IsAnimatingChecks whether a Avalonia.AvaloniaProperty is animating. Inherited from AvaloniaObject.
IsSetChecks whether a Avalonia.AvaloniaProperty is set on this object. Inherited from AvaloniaObject.
SetCurrentValue (2 overloads)Sets the value of a dependency property without changing its value source. Inherited from AvaloniaObject.
SetValue (3 overloads)Sets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject.
VerifyAccessChecks that the current thread is the UI thread and throws if not. Inherited from AvaloniaObject.

Properties

NameDescription
ContentGets the built template content.
DefaultFrameThicknessGets or sets the theme-set default frame thickness.
DefaultShadowThicknessGets or sets the theme-set default shadow thickness.
DefaultTitleBarHeightGets or sets the theme-set default titlebar height.
FrameThicknessGets the effective frame thickness. Uses FrameThicknessOverride if explicitly set, otherwise DefaultFrameThickness. Returns zero if border part is disabled.
HasBorderGets a value indicating whether the border decoration part is enabled.
HasShadowGets a value indicating whether the shadow decoration part is enabled.
HasTitleBarGets a value indicating whether the title bar decoration part is enabled.
ShadowThicknessGets the effective shadow thickness. Uses ShadowThicknessOverride if explicitly set, otherwise DefaultShadowThickness. Returns zero if shadow part is disabled.
TemplateGets or sets the decorations template.
TitleGets or sets the window title displayed in the decorations.
TitleBarHeightGets the effective titlebar height, resolving -1 override to the default. Returns 0 if titlebar part is disabled.
ActualThemeVariantGets the UI theme that is currently used by the element, which might be different than the RequestedThemeVariantProperty. Inherited from StyledElement.
ClassesGets or sets the styled element's classes. Inherited from StyledElement.
DataContextGets or sets the control's data context. Inherited from StyledElement.
IsInitializedGets a value that indicates whether the element has finished initialization. Inherited from StyledElement.
NameGets or sets the name of the styled element. Inherited from StyledElement.
ParentGets the styled element's logical parent. Inherited from StyledElement.
ResourcesGets or sets the styled element's resource dictionary. Inherited from StyledElement.
StyleKeyGets the type by which the element is styled. Inherited from StyledElement.
StylesGets the styles for the styled element. Inherited from StyledElement.
TemplatedParentGets the styled element whose lookless template this styled element is part of. Inherited from StyledElement.
ThemeGets or sets the theme to be applied to the element. Inherited from StyledElement.
TransitionsGets or sets the property transitions for the control. Inherited from Animatable.
DispatcherReturns the Avalonia.AvaloniaObject.Dispatcher that this Avalonia.AvaloniaObject is associated with. Inherited from AvaloniaObject.
ItemInherited from AvaloniaObject.

Content Property

Gets the built template content.

public Avalonia.Controls.Chrome.WindowDrawnDecorationsContent Content { get; set; }

DefaultFrameThickness Property

Gets or sets the theme-set default frame thickness.

public Avalonia.Thickness DefaultFrameThickness { get; set; }

DefaultShadowThickness Property

Gets or sets the theme-set default shadow thickness.

public Avalonia.Thickness DefaultShadowThickness { get; set; }

DefaultTitleBarHeight Property

Gets or sets the theme-set default titlebar height.

public double DefaultTitleBarHeight { get; set; }

FrameThickness Property

Gets the effective frame thickness. Uses FrameThicknessOverride if explicitly set, otherwise DefaultFrameThickness. Returns zero if border part is disabled.

public Avalonia.Thickness FrameThickness { get; set; }

HasBorder Property

Gets a value indicating whether the border decoration part is enabled.

public bool HasBorder { get; set; }

HasShadow Property

Gets a value indicating whether the shadow decoration part is enabled.

public bool HasShadow { get; set; }

HasTitleBar Property

Gets a value indicating whether the title bar decoration part is enabled.

public bool HasTitleBar { get; set; }

ShadowThickness Property

Gets the effective shadow thickness. Uses ShadowThicknessOverride if explicitly set, otherwise DefaultShadowThickness. Returns zero if shadow part is disabled.

public Avalonia.Thickness ShadowThickness { get; set; }

Template Property

Gets or sets the decorations template.

public Avalonia.Controls.Chrome.IWindowDrawnDecorationsTemplate Template { get; set; }

Title Property

Gets or sets the window title displayed in the decorations.

public string Title { get; set; }

TitleBarHeight Property

Gets the effective titlebar height, resolving -1 override to the default. Returns 0 if titlebar part is disabled.

public double TitleBarHeight { get; set; }

Fields

NameDescription
DefaultFrameThicknessPropertyDefines the Avalonia.Controls.Chrome.WindowDrawnDecorations.DefaultFrameThickness property.
DefaultShadowThicknessPropertyDefines the Avalonia.Controls.Chrome.WindowDrawnDecorations.DefaultShadowThickness property.
DefaultTitleBarHeightPropertyDefines the Avalonia.Controls.Chrome.WindowDrawnDecorations.DefaultTitleBarHeight property.
FrameThicknessPropertyDefines the Avalonia.Controls.Chrome.WindowDrawnDecorations.FrameThickness property.
HasBorderPropertyDefines the Avalonia.Controls.Chrome.WindowDrawnDecorations.HasBorder property.
HasShadowPropertyDefines the Avalonia.Controls.Chrome.WindowDrawnDecorations.HasShadow property.
HasTitleBarPropertyDefines the Avalonia.Controls.Chrome.WindowDrawnDecorations.HasTitleBar property.
ShadowThicknessPropertyDefines the Avalonia.Controls.Chrome.WindowDrawnDecorations.ShadowThickness property.
TemplatePropertyDefines the Avalonia.Controls.Chrome.WindowDrawnDecorations.Template property.
TitleBarHeightPropertyDefines the Avalonia.Controls.Chrome.WindowDrawnDecorations.TitleBarHeight property.
TitlePropertyDefines the Avalonia.Controls.Chrome.WindowDrawnDecorations.Title property.
DataContextPropertyDefines the Avalonia.StyledElement.DataContext property. Inherited from StyledElement.
NamePropertyDefines the Avalonia.StyledElement.Name property. Inherited from StyledElement.
ParentPropertyDefines the Avalonia.StyledElement.Parent property. Inherited from StyledElement.
TemplatedParentPropertyDefines the Avalonia.StyledElement.TemplatedParent property. Inherited from StyledElement.
ThemePropertyDefines the Avalonia.StyledElement.Theme property. Inherited from StyledElement.
TransitionsPropertyDefines the Avalonia.Animation.Animatable.Transitions property. Inherited from Animatable.

DefaultFrameThicknessProperty Field

Defines the Avalonia.Controls.Chrome.WindowDrawnDecorations.DefaultFrameThickness property.

public Avalonia.StyledProperty<Avalonia.Thickness> DefaultFrameThicknessProperty

DefaultShadowThicknessProperty Field

Defines the Avalonia.Controls.Chrome.WindowDrawnDecorations.DefaultShadowThickness property.

public Avalonia.StyledProperty<Avalonia.Thickness> DefaultShadowThicknessProperty

DefaultTitleBarHeightProperty Field

Defines the Avalonia.Controls.Chrome.WindowDrawnDecorations.DefaultTitleBarHeight property.

public Avalonia.StyledProperty<double> DefaultTitleBarHeightProperty

FrameThicknessProperty Field

Defines the Avalonia.Controls.Chrome.WindowDrawnDecorations.FrameThickness property.

public Avalonia.DirectProperty<Avalonia.Controls.Chrome.WindowDrawnDecorations, Avalonia.Thickness> FrameThicknessProperty

HasBorderProperty Field

Defines the Avalonia.Controls.Chrome.WindowDrawnDecorations.HasBorder property.

public Avalonia.DirectProperty<Avalonia.Controls.Chrome.WindowDrawnDecorations, bool> HasBorderProperty

HasShadowProperty Field

Defines the Avalonia.Controls.Chrome.WindowDrawnDecorations.HasShadow property.

public Avalonia.DirectProperty<Avalonia.Controls.Chrome.WindowDrawnDecorations, bool> HasShadowProperty

HasTitleBarProperty Field

Defines the Avalonia.Controls.Chrome.WindowDrawnDecorations.HasTitleBar property.

public Avalonia.DirectProperty<Avalonia.Controls.Chrome.WindowDrawnDecorations, bool> HasTitleBarProperty

ShadowThicknessProperty Field

Defines the Avalonia.Controls.Chrome.WindowDrawnDecorations.ShadowThickness property.

public Avalonia.DirectProperty<Avalonia.Controls.Chrome.WindowDrawnDecorations, Avalonia.Thickness> ShadowThicknessProperty

TemplateProperty Field

Defines the Avalonia.Controls.Chrome.WindowDrawnDecorations.Template property.

public Avalonia.StyledProperty<Avalonia.Controls.Chrome.IWindowDrawnDecorationsTemplate> TemplateProperty

TitleBarHeightProperty Field

Defines the Avalonia.Controls.Chrome.WindowDrawnDecorations.TitleBarHeight property.

public Avalonia.DirectProperty<Avalonia.Controls.Chrome.WindowDrawnDecorations, double> TitleBarHeightProperty

TitleProperty Field

Defines the Avalonia.Controls.Chrome.WindowDrawnDecorations.Title property.

public Avalonia.StyledProperty<string> TitleProperty

Events

NameDescription
ActualThemeVariantChangedRaised when the theme variant is changed on the element or an ancestor of the element. Inherited from StyledElement.
AttachedToLogicalTreeRaised when the styled element is attached to a rooted logical tree. Inherited from StyledElement.
DataContextChangedOccurs when the Avalonia.StyledElement.DataContext property changes. Inherited from StyledElement.
DetachedFromLogicalTreeRaised when the styled element is detached from a rooted logical tree. Inherited from StyledElement.
InitializedOccurs when the styled element has finished initialization. Inherited from StyledElement.
ResourcesChangedOccurs when a resource in this styled element or a parent styled element has changed. Inherited from StyledElement.
PropertyChangedRaised when a Avalonia.AvaloniaProperty value changes on this object. Inherited from AvaloniaObject.