Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
790
contentPane active
posted

Hello,

I have a contentpane whose dataContext is ViewModel.

I want the contentPane to be active according a property in the VM . How can i do it?

Parents
No Data
Reply
  • 54937
    Offline posted

    Active is not a boolean state that you can just bind to. The active pane is based on which pane has the keyboard focus. If you want to activate a pane then you need to put keyboard focus into the pane - that is essentially what the Activate method of the ContentPane does. Maybe you could create your own attached  behavior, set it on the ContentPane and set it to a binding to your object's property and when it changes to true then you can call the activate method on the pane.

Children
No Data