Skip to content

How to change MaterialDesign PopupBox PlacementMode via Binding? #3146

Closed Answered by nicolaihenriksen
ojonasplima asked this question in Q&A
Discussion options

You must be logged in to vote

@ojonasplima I would assume it is because your SideBar.PlacementMode property is just a normal property and thus any changes to it are not propagated to the target of the binding; effectively turning it into a one-time binding.

You can either implement SideBar.PlacementMode as a DependencyProperty, or you could have SideBar implement the INotifyPropertyChanged interface and invoke the PropertyChanged event in the setter of the PlacementMode property.

I do notice that you have scratched out some things in the screenshot, which potentially could be attributes? If you're using the CommunityToolkit.Mvvm, then you could achieve some of that functionality simply using attributes on a field.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ojonasplima
Comment options

Answer selected by ojonasplima
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants