I am tracking within my application when a pane's content is visible in order to determine when I need to load or refresh data in a pane.
Currently I am using the LayoutUpdated of the docking control, but this is far from ideal because it is fired way too often and slows down the UI. I have tried some other events without success, and read this post but didn't understand how to implement that, plus it is possibly more than I need to attach to since I don't care when a pane is moved around, only when it's visibility changes.
Is there a better way to track this using either the docking/toolwindow events and if so, could you explain which events I need to subscribe to in order to track this?
Thanks,
Doug
5 Answers, 1 is accepted
In order to detect when a pane is hidden or not, I would suggest using the Show and Close events of RadDocking control.
If you want to determine which pane is selected (for each group), you could use the RadPane.IsSelected property.
I am not sure what is exactly your scenario, but if you could attach an image or describe it in more details, this could shed some light on the problem.
George
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
thanks for responding.
I am currently only able to track whether a pane's visibility changes using the layoutupdated event. This event fires way too frequently to continually check each pane's visibility (!pane.IsHidden && pane.IsSelected) and notify my program when it needs to load data into a pane. Many of the panes respond to different user interaction, and since I have so many of them, I need to know when a pane is visible or not and only load the data if they are visible.
I tested the "Show" and "Close" events on the rad docking, that appears to only get fired when you close or show a pane (as you would expect, I suppose).
What I really need is to track is when a pane's hidden or selected properties change. I do see that the pane group has a "SelectionChanged" event, but I would be curious how to handle groups that are created dynamically by docking a pane elsewhere (as opposed to declared in the XAML).
I've attached a screen shot of my UI for reference.
Thanks,
Doug
I would suggest using RadDocking.ActivePaneChanged event in order to detect when the selection is changed (in the RadDocking control). As long as I understand, you also want to track the when a pane is hidden or not - in this case, the Show and Close events will suit your need because when a pane is closed, it is actually hidden. But if you want to determine when a pane is pinned/unpinned, you could handle the PaneStateChanged event and check the current pane state.
Please, let me know if this helps.
George
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Yes this is helpful. I've replaced "LayoutUpdated" with the combination of "Show", "Close", "ActivePaneChanged" and "PaneStateChanged."
The one thing that I am not able to track is when an unpinned pane is shown and hidden. Currently I am counting these panes as not visible, meaning that their content doesn't refresh itself when the content is revealed. I would like to be able to track when the unpinned pane's content is shown and hidden so I can refresh their content only when needed.
Thanks
Doug
Please, refer to the following forum thread where you can find additional information about this scenario - http://www.telerik.com/community/forums/wpf/docking/slidein-slideout-or-hide-show-event.aspx
I understand this thread is for the WPF version of the docking control, but it works for the Silverlight version as well.
George
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>