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
1405
Switch between content panes in XamDockManager
posted

Hello all.
I have a WPF application with a XamDockManager on it and a XamRibbon.
The ContentPane headers of the XamDockManager are templated.
The two options from the XamRibbon will add in the XamDockManager two user controls (in the code are View and View2), each on a separate ContentPane.
Each of this UserControls contains a StackPanel.
In the View userConteolr (method A), the IsEnabled property of the StackPanel it's bounded to the property IsBusy from the UserControl view model (the class ViewModel).
In the View2 userConteolr (method B), the IsEnabled property of the Button in the StackPanel it's bounded to the property IsBusy from the UserControl view model (the class

ViewModel).
On each StackPanel there is also a checkbox and the IsChecked property of this checkbox is bounded to the same IsBusy property of the view model from the user control.
So that when the checkbox is true, the IsBusy property of the user control view model is true.
When the IsBusy property is true, an animation in the ContentPane header template will start.
For the method A the StackPanel will be disabled and for the method B only the button will be disabled.
The problem is that when the IsBusy is true (method A), I am not able to switch between the ContentPanes.
Can you please help me with this problem? If you need more details about it, please let me know and I will try to explain better.
I also attached a sample.

Thanks.
Nico

 

DockTest.zip
Parents
No Data
Reply
  • 54937
    Offline posted

    Thanks for the sample. What are the steps that I need to follow to reproduce the issue? I tried selecting Methods->Method A and then Methods->Method B, unchecking Enabled on method B, clicking on the header for method A, unchecking enabled so that both are disabled/animating. I then clicked on the tabs (Title1 & Title2) and was able to switch back and forth between the two while they were disabled.

    I'm guessing that you're encountering an issue that was recently reported whereby if the last focused element within the contentpane was disabled that activating the pane (e.g. clicking on the tab item) was not activating the pane. This issue is fixed in the 9.2 and the fix will also be part of the next hotfix (8.1 and forward). One thing you could do in the interim is to clear the FocusManager.FocusedElement of the containing ContentPane (e.g. get the Parent of the UserControl/View which in your case should be the ContentPane and then call FocusManager.SetFocusedElement(cp, null)).

Children