RadPane not auto-hiding when pane content selected

9 posts, 0 answers
  1. Guy
    Guy avatar
    18 posts
    Member since:
    Oct 2012

    Posted 02 Dec 2014 Link to this post

    Hi
    I have a problem with the RadDocking pane which doesn't auto-hide after selecting an item in a list box contained within the RadPane. I want the user to be able to mouse-over the pane header to show the pane (in unpinned mode) and then click or double click an item in the list contained within the pane. When the user moves the mouse away or sets focus to another part of the application, the pane should auto-hide.
    Currently if the user mouses over the pane header, the pane slides into view, and on mouse leave the pane auto-hides correctly. However, if they mouse over the header and then select an item in the list box on the pane, the pane then refuses to auto-hide, no matter what control gets focus after that. The only way to hide the pain is then to manually pin and unpin it.

    How can I get the pane to auto-hide correctly?

    XAML below:

    <
    telerik:RadDocking>
          <telerik:RadDocking.DocumentHost>
              <!--document here-->
          </telerik:RadDocking.DocumentHost>
               
          <telerik:RadSplitContainer Orientation="Vertical" InitialPosition="DockedLeft">
              <telerik:RadPaneGroup>                       
                  <telerik:RadPane IsPinned="True" Header="Products" CanUserClose="False"
                                  CanFloat="False"
                                  CanDockInDocumentHost="False"
                                  ContextMenuTemplate="{x:Null}">
                      <telerik:RadPane.HeaderTemplate>
                          <DataTemplate>
                              <TextBlock Text="{Binding}" Margin="0, 0, 80, 0"/>
                          </DataTemplate>
                      </telerik:RadPane.HeaderTemplate>
                           
                      <!--Product List-->
                      <telerik:RadListBox>
                                 <!--- databound to product list -->
                      </telerik:RadListBox>
                  </telerik:RadPane>
              </telerik:RadPaneGroup>
          </telerik:RadSplitContainer>
      </telerik:RadDocking>

    Thanks,
    Guy
  2. Nasko
    Admin
    Nasko avatar
    585 posts

    Posted 03 Dec 2014 Link to this post

    Hello Guy,

    The described behavior of RadPane is an expected one. By design when a Pane is unpinned and the focus is inside its content, in order to be hidden that focus needs to be lost. For example that could be achieved by activating another Pane inside the Docking control - thus the first one will hide. Please, check the short video we prepared in order to demonstrate the described above behavior.

    Hope this helps. 

    Regards,
    Nasko
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Guy
    Guy avatar
    18 posts
    Member since:
    Oct 2012

    Posted 03 Dec 2014 Link to this post

    Hi
    In our case the focus is being lost, as the focus moves to an item inside the telerik:RadDocking.DocumentHost, but the pane does not hide.
    In your demo video, if you put a text box on the main window and click it, would the pane auto-hide? I would expect that behaviour as the pane has then lost focus. I'm not seeing this happen in practice, perhaps there is a property setting I am missing?
    Thanks,
    Guy
  5. Nasko
    Admin
    Nasko avatar
    585 posts

    Posted 05 Dec 2014 Link to this post

    Hi Guy,

    When the focus is inside the Pane and an item from the DocumentHost is selected the focus should move to the DocumentHost - thus the Pane should hide. So, the described behavior concerning the DocumentHost is an unexpected one.

    The Pane should also hide when the focus moves to a control outside the Docking. I have managed to reproduce that behavior. However we will need some more time to investigate the issue further and I will contact you back with more information as soon as possible.

    Thank you for your patience.

    Regards,
    Nasko
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Vikas
    Vikas avatar
    64 posts
    Member since:
    May 2014

    Posted 05 Dec 2014 in reply to Nasko Link to this post

    I am also facing a similar issue, In my case i am using a mix of WPF and winforms host, the focus is set to a user control hosted inside winforms host but the RadPane does not auto hide, is there a property that we can data bind to to hide the Rad Pane.

    thanks
    vikas
  7. Nasko
    Admin
    Nasko avatar
    585 posts

    Posted 08 Dec 2014 Link to this post

    Hello,

    Guy, we have logged the issue in our internal backlog and it will be fixed in one of our future releases.
    We apologize for any inconvenience caused and we have updated your Telerik points for the involvement.

    Vikas, if the WinForms control is outside RadDocking the issue should be resolved with the fix mentioned above. However, if that's not the case, could you please provide us more detailed information about your scenario, so we could be able to investigate the issue further?

    We are looking forward to hearing from you.

    Regards,
    Nasko
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  8. Vikas
    Vikas avatar
    64 posts
    Member since:
    May 2014

    Posted 08 Dec 2014 in reply to Nasko Link to this post

    No in my case the Winforms is inside the RadDocking, this is the visual structure of my application
    WPF window --> DocumentHost --> RadPaneGroup --> RadPane --> WPF User control --> Windforms Host

    we have legacy screens developed using winforms, we are not changing them all at  once, first step is to change the Outer shell to WPF and we are using RadDocking to host legacy screens.

    vikas
  9. Vikas
    Vikas avatar
    64 posts
    Member since:
    May 2014

    Posted 08 Dec 2014 in reply to Vikas Link to this post

    Forgot to mention, I am able to hide it by changing the IsPinned to true and then to false, it is not very smooth but works.

    Vikas
  10. Nasko
    Admin
    Nasko avatar
    585 posts

    Posted 10 Dec 2014 Link to this post

    Hi Vikas

    Please, check that sample project from our SDK Repository that demonstrates how to host WindowsForms control inside WPF. Note that in this scenario you would need manually activate the Pane with the WinFormsHost inside. For example you can do that in the GotFocus event handler of the WindowsFormsHost as shown below:

    private void WindowsFormsHost_GotFocus(object sender, RoutedEventArgs e)
    {
        this.docking.ActivePane = this.winFormsPane;
    }

    Hope this will work for you.

    Regards,
    Nasko
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for WPF is Visual Studio 2017 Ready