简体   繁体   中英

Bind to IsEnabled in WPF with Caliburn.Micro

I have a series of WrapPanels within a DockPanel. I want all but the top panel to be disabled at the beginning but all panels to be visible. As the user satisfies conditions in one panel I want to enable another panel. However, I can't figure out how I can bind the IsEnabled property of the WrapPanel (or if I need to the individual elements) to a boolean in my ViewModel. Any idea?

Update2: This works amazingingly! Adding a convention for IsEnabled to Caliburn.Micro

Update: Oops I lied. It keeps resetting all of my XAML by having an object of the same type in the ViewModel.

Just realized that I can just create an instance of what I am trying to >enable/disable in the ViewModel and from that access the IsEnabled property. Not >direct but works!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM