This is a migrated thread and some comments may be shown as answers.

RadPane Focus Problem (Another)

1 Answer 131 Views
Docking
This is a migrated thread and some comments may be shown as answers.
James C
Top achievements
Rank 1
James C asked on 26 Aug 2010, 02:51 PM
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:RadDocking.DocumentHost>
        <telerikDocking:RadSplitContainer>
            <telerikDocking:RadPaneGroup cal:RegionManager.RegionName="TabbedDocumentsRegion">
            </telerikDocking:RadPaneGroup>
        </telerikDocking:RadSplitContainer>
    </telerikDocking:RadDocking.DocumentHost>
     
    <telerikDocking:RadSplitContainer InitialPosition="DockedLeft">
        <telerikDocking:RadPaneGroup cal:RegionManager.RegionName="QuestionRegion">
        </telerikDocking:RadPaneGroup>
    </telerikDocking:RadSplitContainer>
 
    <telerikDocking:RadSplitContainer InitialPosition="DockedRight">
        <telerikDocking:RadPaneGroup cal:RegionManager.RegionName="PropertiesAndRoutingsRegion">
            <telerikDocking:RadPane Header="Routings"/>-->
        </telerikDocking:RadPaneGroup>
    </telerikDocking:RadSplitContainer>
 
    <telerikDocking:RadSplitContainer InitialPosition="DockedBottom" Height="75">
        <telerikDocking:RadPaneGroup>
            <telerikDocking:RadPane Header="Errors"/>
        </telerikDocking:RadPaneGroup>
    </telerikDocking:RadSplitContainer>
</telerikDocking:RadDocking>

1 Answer, 1 is accepted

Sort by
0
George
Telerik team
answered on 31 Aug 2010, 01:27 PM
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.

Greetings,
George
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
Tags
Docking
Asked by
James C
Top achievements
Rank 1
Answers by
George
Telerik team
Share this question
or