Replies: 1 comment 1 reply
-
@sam-wheat The easiest way would be to add a new Action to change the property value of Something like this: Content of Generic.xaml
Another easy way would be to call SelectionChangedCommand from a PropertyChangedCallback on the SelectedItem property instead of from a EventTrigger (Though this would also call SelectionChangedCommand when SelectedItem is changed from code, not just when a user select an item). Something like this:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wrote a simple control that displays a popup with a ListBox. Implementer of my control can bind a command to
SelectionChangedCommand
, which will execute when user selects an item from the ListBox. However, beforeSelectionChangedCommand
executes, I want to setIsDropDownOpen
property on my control to false which will close the popup.Basically I want to intercept
SelectionChangedCommand
, setIsDropDownOpen
to false, then allowSelectionChangedCommand
to execute normally. How do I do this?StaysOpen
property of Popup does not achive the desired effect and in fact prevents the popup from closing when the mouse leaves.Example project attached.
Thank you
CommandProblem.zip
.
Beta Was this translation helpful? Give feedback.
All reactions