From ce19d9cfd3ba83b57f9e115131b286695e4cae05 Mon Sep 17 00:00:00 2001 From: Martin Zikmund Date: Wed, 2 Oct 2024 13:48:40 +0200 Subject: [PATCH] docs: Note on `VisualStateGroup.StateTriggers` usage (cherry picked from commit 718147611c7ee6f873ffdbf9538512d3152fa28f) --- doc/Learn/Markup/VisualStateManager.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/Learn/Markup/VisualStateManager.md b/doc/Learn/Markup/VisualStateManager.md index 7d88793a4b..d497b62005 100644 --- a/doc/Learn/Markup/VisualStateManager.md +++ b/doc/Learn/Markup/VisualStateManager.md @@ -47,6 +47,9 @@ new Grid() )))); ``` +> [!IMPORTANT] +> When you use `StateTriggers`, ensure that the `VisualStateGroup` is declared under the first child of the root of a templated control in order for the triggers to take effect automatically. See [WinUI documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.visualstate#remarks) for more information. + ## Next Steps - [Storyboards](xref:Uno.Extensions.Markup.Storyboards)