Browse Source

Clarify that ElementRole is dependent on ExtendClientAreaToDecorationsHint (#21243)

pull/21275/head
Julien Lebosquain 6 months ago
committed by GitHub
parent
commit
db2b01bc01
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      src/Avalonia.Controls/Chrome/WindowDecorationProperties.cs

2
src/Avalonia.Controls/Chrome/WindowDecorationProperties.cs

@ -12,6 +12,7 @@ public static class WindowDecorationProperties
/// Marks a visual element with a specific role for non-client hit-testing.
/// Can be applied to any element in the visual tree, not limited to decoration children.
/// </summary>
/// <remarks>Setting an element role only has an effect if <see cref="Window.ExtendClientAreaToDecorationsHint"/> is true.</remarks>
public static readonly AttachedProperty<WindowDecorationsElementRole> ElementRoleProperty =
AvaloniaProperty.RegisterAttached<Visual, WindowDecorationsElementRole>("ElementRole", typeof(WindowDecorationProperties));
@ -23,5 +24,6 @@ public static class WindowDecorationProperties
/// <summary>
/// Sets the <see cref="WindowDecorationsElementRole"/> for the specified element.
/// </summary>
/// <remarks>Setting an element role only has an effect if <see cref="Window.ExtendClientAreaToDecorationsHint"/> is true.</remarks>
public static void SetElementRole(Visual element, WindowDecorationsElementRole value) => element.SetValue(ElementRoleProperty, value);
}

Loading…
Cancel
Save