Hi All!
I solve the problem to disable of some RadPanes to drop on a specific RadPaneGroup. RadPane groups are created in xaml with a defined Name (also Tag has been tested):
<telerik:RadSplitContainer InitialPosition="DockedLeft">
<telerik:RadPaneGroup x:Name="Left"/>
</telerik:RadSplitContainer>
In a custom docking panes factory the each RadPane (Tag contains position - string, e.g. Left) is correctly added into the specific RadPaneGroup based on the Name specified above. All the RadPanes are correctly added.
protected override void AddPane(Telerik.Windows.Controls.RadDocking radDocking, Telerik.Windows.Controls.RadPane pane) { var tag = pane.Tag.ToString(); if (radDocking.SplitItems.ToList().FirstOrDefault(i => i.Control.Name.Contains(tag)) is RadPaneGroup paneGroup) { paneGroup.Items.Add(pane); } else { base.AddPane(radDocking, pane);
} }
OnPreviewShowCompass event is used to allow a RadPane to drop on a specific RadPaneGroup. However, in the argument of this method (PreviewShowCompassEventArgs e) the Name property in e.TargetGroup is empty. But a given TargetGroup (RadPaneGroup) contains the correct number and types of RadPanes.
I cannot understand why Name property is empty, it should be specified based on xaml and a reference to this should be taken.
Thank you.
Radek