How to bind Trigger Value property to control property #4849
Unanswered
sam-wheat
asked this question in
Questions & Help
Replies: 2 comments 6 replies
-
@sam-wheat I don't see this code you've shared in your repo? Where is the VSM in relation to the button? What is the underlying scenario you're trying to accomplish? |
Beta Was this translation helpful? Give feedback.
6 replies
-
@sam-wheat your VSM can't just live anywhere it has to be in the root of a control, I would suspect that's the first issue? See microsoft/microsoft-ui-xaml#5576 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In this example repo I have a custom control with a button. The
DataContext
of the button is set to the control. This appears to work because the buttonCommand
works correctly:The problem is with the
VisualStateManager
- does it inherit it'sDataContext
from the button? In any case, I need to bind theValue
property of the trigger to theIsExpanded
property of the control:Beta Was this translation helpful? Give feedback.
All reactions