RadPane Focus Problem (Another)

2 posts, 0 answers
  1. James C
    James C avatar
    1 posts
    Member since:
    May 2010

    Posted 26 Aug 2010 Link to this post

    Note - this question may be similar to this thread

    I have a Silverlight MVVM prototype project which uses Prism & the Rad docking framework, where each view is a RadPane. The interface is very similar to Blend & VS. In order to implement undo/redo functionality I need the application to track which view is currently in focus whenever a command is executed, so that each view's commands can only be undone/redone when that view has the focus.

    The obvious solution of adding LostFocus/GotFocus event-handlers on the RadPane views doesn't work - if a control (e.g. a TreeViewItem) that is a child of the view/RadPane is clicked on, the GotFocus event doesn't 'bubble up' to the RadPane, even though it is part of the visual hierarchy, and therefore the application can't track where the focus is at the RadPane/view level. The only time these events get fired for the RadPane is when I click on the header tab for the RadPane.

    Is there some obvious way of tracking the focus? Sorry if this is a stupid question!

    <telerikDocking:RadDocking x:Name="radDockingHost" Grid.Row="2">
                <telerikDocking:RadPaneGroup cal:RegionManager.RegionName="TabbedDocumentsRegion">
        <telerikDocking:RadSplitContainer InitialPosition="DockedLeft">
            <telerikDocking:RadPaneGroup cal:RegionManager.RegionName="QuestionRegion">
        <telerikDocking:RadSplitContainer InitialPosition="DockedRight">
            <telerikDocking:RadPaneGroup cal:RegionManager.RegionName="PropertiesAndRoutingsRegion">
                <telerikDocking:RadPane Header="Routings"/>-->
        <telerikDocking:RadSplitContainer InitialPosition="DockedBottom" Height="75">
                <telerikDocking:RadPane Header="Errors"/>
  2. George
    George avatar
    1332 posts

    Posted 31 Aug 2010 Link to this post

    Hello James,

    Thank you for contacting us.

    RadPanes represents only the small tabs on each RadPaneGroup. For more information about the visual structure of RadDocking you could refer to our online documentation - http://www.telerik.com/help/silverlight/raddocking-visual-structure.html

    I would suggest you to handle GotFocus on each RadPaneGroup. Using the sender parameter (which is of type RadPaneGroup) you could get the focussed group and you could get the selected pane via the SelectedPane property (of RadPaneGroup).
    I hope this helps. I will be glad to assist you further.

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top