PaneStateChange event on adding new pane

3 posts, 1 answers
  1. Nikita
    Nikita avatar
    13 posts
    Member since:
    Jan 2015

    Posted 02 Mar 2015 Link to this post

    I have a simple pane factory which basically looks like this:

    class PaneFactory : DockingPanesFactory
    {
        protected override void AddPane(RadDocking radDocking, RadPane pane)
        {
            //Docking is UserControl, which contains RadDocking
            var docking = radDocking.ParentOfType<Docking>();
            var settings = pane.Tag as PaneSettings;
     
            if (settings.ScreenPosition == ScreenPosition.Left)
            {
                //LeftPaneGroup is pane group declared in xaml (docked to left side)
                docking.LeftPaneGroup.AddItem(pane, DockPosition.Center);
            }
            else
            {
                //DocumentPaneGroup is document host declared in xaml
                docking.DocumentPaneGroup.AddItem(pane, DockPosition.Center);
            }
        }
    }

    So there are two options: pane is either initially docked to the left or to the document host. If it is docked to document host - PaneStateChange
    event is fired, but if it is docked to the left - there is no event. Is this a bug or an expected behaviour? Looks really inconsistent to me. Is there a way to force PaneStateChange event to always fire, when new pane is added?
  2. Answer
    Nasko
    Admin
    Nasko avatar
    586 posts

    Posted 04 Mar 2015 Link to this post

    Hello Nikita,

    We understand your concerns, however with the current implementation of RadDocking when a Pane is added inside the DocumentHost it is considered as if it's state is being changed- thus the PaneStateChaged is fired. We will consider if that behavior should be improved for one of our future releases of the controls.

    We hope the provided information will help you. Please, do not hesitate to contact if you have any additional questions or concerns.

    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. Nikita
    Nikita avatar
    13 posts
    Member since:
    Jan 2015

    Posted 05 Mar 2015 Link to this post

    Pretty wierd. But oh well.

    Adding pane to document host, and then instantly moving it to target pane group seems to guarantee that the event is fired. Although it fires twice in that case (which is not a problem for me). There is probably some performance hit in this scenario, but it is not noticable so far, so I went with that workaround.
Back to Top