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

Empty content when dynamically generated docking

1 Answer 70 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Marc
Top achievements
Rank 1
Marc asked on 14 Nov 2012, 01:14 PM
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...

1 Answer, 1 is accepted

Sort by
0
Marc
Top achievements
Rank 1
answered on 15 Nov 2012, 05:42 PM
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...
Tags
Docking
Asked by
Marc
Top achievements
Rank 1
Answers by
Marc
Top achievements
Rank 1
Share this question
or