WindowDecorations.ElementRole not recognized #21234
-
|
This property would seem to be fairly key to implementing usable controls in the title bar area, without removing the native Min/Max/Close controls. I want to put navigation buttons and a search box on the left side of the title bar but clicks seem to be captured by the Window Title. Do I have that wrong or am I missing something? Despite being in the docs and on Github, this doesn't appear in 12.0.1. Any guidance on when this might be published? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
In 12.0.1 the attached property exists, but the name in XAML is For controls inside the titlebar area that should receive input, mark them as user-interactive decoration elements: <Button
WindowDecorationProperties.ElementRole="User"
Content="Back" />
<TextBox
WindowDecorationProperties.ElementRole="User"
Watermark="Search" />If your XAML file does not resolve the type from the default Avalonia namespace, add the namespace explicitly: xmlns:chrome="using:Avalonia.Controls.Chrome"and then use: chrome:WindowDecorationProperties.ElementRole="User"The enum type behind it is |
Beta Was this translation helpful? Give feedback.
In 12.0.1 the attached property exists, but the name in XAML is
WindowDecorationProperties.ElementRole, notWindowDecorations.ElementRole.For controls inside the titlebar area that should receive input, mark them as user-interactive decoration elements:
If your XAML file does not resolve the type from the default Avalonia namespace, add the namespace explicitly:
and then use:
The enum type behind it is
Avalonia.Input.WindowDecorationsE…