I am using a combination of XamOutlookBar, XamDockManager, TabGroupPane and some ContentPane objects.
If I instantiate a UserControl in the SelectedGroupChanged event handler of a XamOutlookBar and add it to a TabGroupPane, then (still within the SelectedGroupChanged event handler) I invoke the UserControl to perform a long operation on a BackgroundWorker thread, but set the visibility of floating ContentPanes to Hidden prior to this long operation, when I try to set the visibility of these ContentPanes to Visible after the long operation has completed (in RunWorkedCompleted), the ContentPanes don't render.
If I then select another UserControl on the TabGroupPane (previously added), then reselect the UserControl that I have the floating ContentPanes on, those ContentPanes all of a sudden appear.
After some experimentation, I found that adding a Sleep at the end of the SelectedGroupChanged event handler that was longer than the long operation invoked in the UserControl resolved the issue. However, I can't do this in my application as the long operation can vary and is unpredictable.
I have attached an example project demonstrating this. When 'Call & Alert Manager' is selected in the application, ScreenSelector.xamOutlookBar_SelectedGroupChanged instantiates CallAndAlertManager UserControl and then calls SetData() on it which takes 3 seconds. When the operation has finished, the spCallMonitor SplitPane (cpCallMonitor ContentPane) is not visible. However, if I put a 4-second Sleep at the end of ScreenSelector.xamOutlookBar_SelectedGroupChanged, it displays fine.
How can this be resolved?
Thanks,
Jason
I don't see how we are involved as all rendering is done by WPF but I can't open your zip to even see the issue. Can you reattach the project so we can see the problem being exhibited?
I was able to open the zip file when I switched to 7zip. Anyway, I see the problem you are describing now. Basically the dockmanager is not calling show on the toolwindow that would host the floating pane unless the visibility of the floating pane is visible. I'll submit an issue for this but for now you should be able to get around this by using Collapsed instead of Hidden.