RadDock GotFocus & LostFocus problem

2 posts, 0 answers
  1. Joe Lozina
    Joe Lozina avatar
    25 posts
    Member since:
    Jun 2010

    Posted 26 Aug 2010 Link to this post

    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
  2. George
    Admin
    George avatar
    1332 posts

    Posted 27 Aug 2010 Link to this post

    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
  3. DevCraft banner
Back to Top