How to change MaterialDesign PopupBox PlacementMode via Binding? #3146
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@ojonasplima I would assume it is because your You can either implement 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. |
Beta Was this translation helpful? Give feedback.
@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 aDependencyProperty
, or you could haveSideBar
implement theINotifyPropertyChanged
interface and invoke thePropertyChanged
event in the setter of thePlacementMode
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.