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

RadDock GotFocus & LostFocus problem

1 Answer 94 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Joe Lozina
Top achievements
Rank 1
Joe Lozina asked on 26 Aug 2010, 08:17 AM
Hi,

I have a RadDocumentPane and a RadPane in a RadPaneGroup. If I click on one Pane I would like to hide a pane that is DockedRight.
This doesn't seem to be working because when I click on the second tab called Dashboard it executes the GotFocus & LostFocus methods in the code behind one after the other and when I click on the first tab called Planner it doesn't execute the GotFocus & LostFocus methods.

Can you let me know what I am doing wrong?


<telerik:RadDocking  >
    <telerik:RadDocking.DocumentHost>
 
        <telerik:RadSplitContainer>
            <telerik:RadPaneGroup>
                <telerik:RadDocumentPane x:Name="PlannerPane" Title="Planner" CanUserClose="False" CanFloat="False" GotFocus="PlannerPane_GotFocus" LostFocus="PlannerPane_LostFocus" >
                    <telerik:RadDocumentPane.Content>
                        <ContentControl Regions:RegionManager.RegionName="MainListRegion"/>
                    </telerik:RadDocumentPane.Content>
                </telerik:RadDocumentPane>
                <telerik:RadPane Header="Dashboard" CanFloat="False" CanUserClose="False" GotFocus="DashboardPane_GotFocus" LostFocus="DashboardPane_LostFocus">
                    <telerik:RadPane.Content>
                        <TextBlock TextWrapping="Wrap" Text="Dashboard functionality for head office will be in this panel" />
                    </telerik:RadPane.Content>
                </telerik:RadPane>
            </telerik:RadPaneGroup>
        </telerik:RadSplitContainer>
         
    </telerik:RadDocking.DocumentHost>
 
    <!-- Right Dock -->
    <telerik:RadSplitContainer Orientation="Horizontal" InitialPosition="DockedRight" Width="370" MinWidth="370"  MaxWidth="370"   >
        <telerik:RadPaneGroup>
            <telerik:RadPane x:Name="rightPane" Header="Action Items">
                <ContentControl Regions:RegionManager.RegionName="ActionTabsRegion"/>
            </telerik:RadPane>
        </telerik:RadPaneGroup>
    </telerik:RadSplitContainer>
 
    <!-- Bottom Dock -->
 
    <telerik:RadSplitContainer Orientation="Horizontal" InitialPosition="DockedBottom" MinHeight="375"   >
        <telerik:RadPaneGroup >
            <telerik:RadPane x:Name="bottomPane" Header="Work Item Form">
                <ContentControl Regions:RegionManager.RegionName="WorkItemRegion"/>
            </telerik:RadPane>
        </telerik:RadPaneGroup>
    </telerik:RadSplitContainer>
 
</telerik:RadDocking>



private void DashboardPane_GotFocus(object sender, RoutedEventArgs e)
   {
       rightPane.IsHidden = true;
   }
 
   private void DashboardPane_LostFocus(object sender, RoutedEventArgs e)
   {
       rightPane.IsHidden = false;
   }
 
   private void PlannerPane_GotFocus(object sender, RoutedEventArgs e)
   {
      rightPane.IsHidden = false;       

   }
 
   private void PlannerPane_LostFocus(object sender, RoutedEventArgs e)
   {
        rightPane.IsHidden = true;
   }

Thanks,
Joe

1 Answer, 1 is accepted

Sort by
0
George
Telerik team
answered on 27 Aug 2010, 04:36 PM
Hello Joe Lozina,

I would suggest you to use SelectionChanged event handler of RadPaneGroup to accomplish this. It fires every time when a RadPane, placed in this RadPaneGroup, is selected.

I hope this information helps.

Best wishes,
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
Joe Lozina
Top achievements
Rank 1
Answers by
George
Telerik team
Share this question
or