Empty content when dynamically generated docking

2 posts, 0 answers
  1. Marc
    Marc avatar
    88 posts
    Member since:
    Jul 2011

    Posted 14 Nov 2012 Link to this post

    after upgrading from Q3 2011 to Q3 2012 the following code doesn't work anymore and i cannot figure out why.

    protected virtual void AddPane(RadPane pane)
            {
                var dockState = GetDockState(pane);
     
                RadSplitContainer splitContainer;
                if (dockState == null || dockState == DockState.FloatingDockable || dockState == DockState.FloatingOnly)
                {
                    splitContainer = _dock.DocumentHost as RadSplitContainer;
                    if (splitContainer == null)
                    {
                        splitContainer = _factory.CreateSplitContainer();
                        splitContainer.SetValue(View.IsGeneratedProperty, true);
                        _dock.DocumentHost = splitContainer;
                    }
                }
                else
                {
                    splitContainer = _dock.Items.OfType<RadSplitContainer>().FirstOrDefault(
                        container => container.GetValue(RadDocking.DockStateProperty) as DockState? == dockState);
                    if (splitContainer == null)
                    {
                        splitContainer = _factory.CreateSplitContainer();
                        splitContainer.InitialPosition = dockState.Value;
                        splitContainer.SetValue(View.IsGeneratedProperty, true);
                        _dock.Items.Add(splitContainer);
                    }
                }
     
                var paneGroup = splitContainer.Items.OfType<RadPaneGroup>().FirstOrDefault();
                if (paneGroup == null)
                {
                    paneGroup = _factory.CreatePaneGroup();
                    paneGroup.IsContentPreserved = true;
                    paneGroup.SetValue(View.IsGeneratedProperty, true);
                    paneGroup.SelectedItemRemoveBehaviour = SelectedItemRemoveBehaviour.SelectNone;
                    splitContainer.Items.Add(paneGroup);
                }
     
                paneGroup.AddItem(pane, DockPosition.Center);
           
    }

    now there is no visible content in this pane.

    hoping for an answer...
  2. Marc
    Marc avatar
    88 posts
    Member since:
    Jul 2011

    Posted 15 Nov 2012 Link to this post

    I'm so sorry. Forget my question. It was my mistake and the problem was a completely different one.

    Hope you didn't invest time here...
  3. DevCraft banner
Back to Top