RadDocking
Represents a docking control that provides a flexible layout system for managing panes, tool windows, and document hosts.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.Docking.dll
Syntax:
[TelerikToolboxCategory("Containers")]
public class RadDocking : ItemsControl, INotifyLayoutChange
Inheritance: objectRadDocking
Implements:
Constructors
Initializes a new instance of the RadDocking class.
public RadDocking()
Fields
ActivePaneChangedEvent
RoutedEvent
Identifies the ActivePaneChanged routed event.
public static readonly RoutedEvent ActivePaneChangedEvent
ActivePaneProperty
DependencyProperty
Identifies ActivePane dependency property.
public static readonly DependencyProperty ActivePaneProperty
AllowDragReorderProperty
DependencyProperty
Identifies the
public static readonly DependencyProperty AllowDragReorderProperty
CanAutoHideAreaExceedScreenProperty
DependencyProperty
Identifies the
public static readonly DependencyProperty CanAutoHideAreaExceedScreenProperty
CloseButtonPositionProperty
DependencyProperty
Identifies the
public static readonly DependencyProperty CloseButtonPositionProperty
CloseEvent
RoutedEvent
Identifies the Close routed event.
public static readonly RoutedEvent CloseEvent
CompassStyleProperty
DependencyProperty
Identifies the CompassStyle dependency property.
public static readonly DependencyProperty CompassStyleProperty
ConstraintAutoHideAreaProperty
DependencyProperty
Identifies the
public static readonly DependencyProperty ConstraintAutoHideAreaProperty
CurrentSaveLoadLayoutHelperProperty
DependencyProperty
Identifies the CurrentSaveLoadLayoutHelper dependency property.
public static readonly DependencyProperty CurrentSaveLoadLayoutHelperProperty
DockingPanesFactoryProperty
DependencyProperty
Identifies the DockingPanesFactory dependency property.
public static readonly DependencyProperty DockingPanesFactoryProperty
DockStateProperty
DependencyProperty
Identifies the DocumentsProperty dependency property.
public static readonly DependencyProperty DockStateProperty
DocumentHostProperty
DependencyProperty
Identifies the DocumentHost dependency property.
public static readonly DependencyProperty DocumentHostProperty
DragDropModeProperty
DependencyProperty
Identifies the
public static readonly DependencyProperty DragDropModeProperty
ExcludedFromLayoutSaveProperty
DependencyProperty
Identifies the ExcludedFromLayoutSave dependency property.
public static readonly DependencyProperty ExcludedFromLayoutSaveProperty
FloatingLocationProperty
DependencyProperty
Identifies the DocumentsProperty dependency property.
public static readonly DependencyProperty FloatingLocationProperty
FloatingSizeProperty
DependencyProperty
Identifies the FloatingSize dependency property.
public static readonly DependencyProperty FloatingSizeProperty
FloatingWindowStateProperty
DependencyProperty
Identifies the FloatingWindowState dependency property.
public static readonly DependencyProperty FloatingWindowStateProperty
FlyoutBehaviorProperty
DependencyProperty
Identifies the
public static readonly DependencyProperty FlyoutBehaviorProperty
FlyoutMinLengthProperty
DependencyProperty
Identifies the
public static readonly DependencyProperty FlyoutMinLengthProperty
GeneratedItemsFactoryProperty
DependencyProperty
Identifies the GeneratedItemsFactory dependency property.
public static readonly DependencyProperty GeneratedItemsFactoryProperty
HasDocumentHostProperty
DependencyProperty
Identifies the HasDocumentHost dependency property.
public static readonly DependencyProperty HasDocumentHostProperty
IsAutoGeneratedProperty
DependencyProperty
Identifies the
public static readonly DependencyProperty IsAutoGeneratedProperty
IsRestrictedProperty
DependencyProperty
Identifies the IsRestricted dependency property.
public static readonly DependencyProperty IsRestrictedProperty
IsRestrictedWhenMaximizedProperty
DependencyProperty
Identifies the
public static readonly DependencyProperty IsRestrictedWhenMaximizedProperty
NavigatorProperty
DependencyProperty
Identifies the Navigator dependency property.
public static readonly DependencyProperty NavigatorProperty
PaneActivationModeProperty
DependencyProperty
Identifies the
public static readonly DependencyProperty PaneActivationModeProperty
PanesSourceProperty
DependencyProperty
Identifies the PanesSource dependency property.
public static readonly DependencyProperty PanesSourceProperty
PinEvent
RoutedEvent
Identifies the Pin routed event.
public static readonly RoutedEvent PinEvent
PreviewCloseEvent
RoutedEvent
Identifies the PreviewClose routed event.
public static readonly RoutedEvent PreviewCloseEvent
PreviewPinEvent
RoutedEvent
Identifies the PreviewPin routed event.
public static readonly RoutedEvent PreviewPinEvent
PreviewShowEvent
RoutedEvent
Identifies the PreviewShow routed event.
public static readonly RoutedEvent PreviewShowEvent
PreviewUnpinEvent
RoutedEvent
Identifies the PreviewUnpin routed event.
public static readonly RoutedEvent PreviewUnpinEvent
RestrictedAreaMarginProperty
DependencyProperty
Identifies the
public static readonly DependencyProperty RestrictedAreaMarginProperty
RetainPaneSizeModeProperty
DependencyProperty
Identifies the
public static readonly DependencyProperty RetainPaneSizeModeProperty
RootCompassStyleProperty
DependencyProperty
Identifies the RootCompassStyle dependency property.
public static readonly DependencyProperty RootCompassStyleProperty
SerializationTagProperty
DependencyProperty
Identifies the SerializationTag dependency property.
public static readonly DependencyProperty SerializationTagProperty
ShowEvent
RoutedEvent
Identifies the Show routed event.
public static readonly RoutedEvent ShowEvent
ShowResizePreviewProperty
DependencyProperty
Identifies ShowResizePreview dependency property.
public static readonly DependencyProperty ShowResizePreviewProperty
UnpinEvent
RoutedEvent
Identifies the Unpin routed event.
public static readonly RoutedEvent UnpinEvent
UseNativeInitialToolWindowDragProperty
DependencyProperty
Identifies the
public static readonly DependencyProperty UseNativeInitialToolWindowDragProperty
VisualCueStyleProperty
DependencyProperty
Identifies the VisualCueStyle dependency property.
public static readonly DependencyProperty VisualCueStyleProperty
Properties
Gets or sets the active pane.
public RadPane ActivePane { get; set; }
Gets or sets a value indicating whether reordering of RadPanes is allowed.
public bool AllowDragReorder { get; set; }
Gets or sets whether unsafe mode is allowed. Don't set this property to true if you are not sure you need to do this.
public bool AllowUnsafeMode { get; set; }
Gets or sets a value indicating whether the panes in the AutoHideArea could go outside of the screen. The default value is False - the unpinned panes respect the boundaries of the screen.
public bool CanAutoHideAreaExceedScreen { get; set; }
Gets or sets the position of the CloseButton.
public CloseButtonPosition CloseButtonPosition { get; set; }
CompassStyle
Style
Gets or sets the style for the Compass control.
public Style CompassStyle { get; set; }
Gets or sets a value indicating whether the RadDocking control should constraint its AutoHideArea to its size or not.
public bool ConstraintAutoHideArea { get; set; }
Gets or sets the current save load layout helper.
public SaveLoadLayoutHelper CurrentSaveLoadLayoutHelper { get; set; }
The current save load layout helper.
Gets or sets the current factory for generating items in MVVM scenarios.
public DockingPanesFactory DockingPanesFactory { get; set; }
The current factory for generating items.
Gets the content of the document host.
public object DocumentHost { get; set; }
The content of the document host.
Gets or sets the drag drop mode of the RadDocking control.
public DockingDragDropMode DragDropMode { get; set; }
Gets or sets the behavior of the flyout of the AutoHideArea.
public IFlyoutBehavior FlyoutBehavior { get; set; }
This property could be set to either one of the existing implementations of the IFlyoutBehavior interface (HoverFlyoutBehavior, ClickFlyoutBehavior) or to a custom implementation.
Gets or sets the minimum size of the flyout element of the auto-hide area.
public double FlyoutMinLength { get; set; }
Gets or sets the current factory for generating items.
public IGeneratedItemsFactory GeneratedItemsFactory { get; set; }
The current factory for generating items.
Gets or sets a value indicating whether the RadDocking control has DocumentHost area or not.
public bool HasDocumentHost { get; set; }
Gets a value indicating whether this instance is layout changing.
public bool IsLayoutChanging { get; }
True if this instance is layout changing; otherwise, false.
Implements:
Gets or sets a value indicating whether the ToolWindows of the Docking control are restricted to the Restricted area of the control.
public bool IsRestricted { get; set; }
True if ToolWindows of the Docking control are restricted; otherwise, false.
Restricts the ToolWindows of the Docking control to its Restricted area and does not allow dragging out of it. The Restricted area is calculated using the RestrictedAreaMargin property and the application area (the containing window in desktop application and the browser's content in XBAP).
Gets or sets whether the ToolWindow will maximize to the full screen size or to the set restricted area margin.
public bool IsRestrictedWhenMaximized { get; set; }
Gets an enumerator for the logical child objects of the System.Windows.Controls.ItemsControl object.
protected override IEnumerator LogicalChildren { get; }
Gets or sets the PaneNavigator instance used in the docking control.
public DockingNavigator Navigator { get; set; }
Gets or sets a value indicating which pane should be activated when the active pane is closed.
public ActivationMode PaneActivationMode { get; set; }
Gets the list of panes.
public IEnumerable<RadPane> Panes { get; }
The panes.
Gets or sets a collection used to generate the content of the RadDocking control.
public IEnumerable PanesSource { get; set; }
The collection used to generate the content of the RadDocking control.
RestrictedAreaMargin
Thickness
Gets or sets a value indicating the margin of the Restricted area from the application area when the IsRestricted property is set to true.
public Thickness RestrictedAreaMargin { get; set; }
The value of this property is used for calculating the Restricted area of the Docking used to restrict the ToolWindows of the Docking control when the IsRestricted property is set to true. The value of this property describes the margins of the Restricted area from the application area (the containing window in desktop application and the browser's content in XBAP).
Gets or sets a value indicating whether the pane size should be retained.
public RetainSizeMode RetainPaneSizeMode { get; set; }
RootCompassStyle
Style
Gets or sets the style for the root Compass control.
public Style RootCompassStyle { get; set; }
Gets or sets a value indicating whether a preview visual is shown while resizing.
public bool ShowResizePreview { get; set; }
Gets the list of all split containers.
public IEnumerable<RadSplitContainer> SplitContainers { get; }
The split containers in the docking.
Gets the list of RadPaneGroup and RadSplitContainer objects.
public IEnumerable<ISplitItem> SplitItems { get; }
The panes.
Gets or sets a value indicating whether the native WPF Window drag should be used when undocking Pane or PaneGroup.
public bool UseNativeInitialToolWindowDrag { get; set; }
VisualCueStyle
Style
Gets or sets the style of the element that will be used as snapping visual cue.
public Style VisualCueStyle { get; set; }
Methods
Attaches the default SaveLoadLayoutHelper.
public void AttachDefaultSaveLoadLayoutHelper()
Detaches the current save load layout helper.
public void DetachCurrentSaveLoadLayoutHelper()
Gets the value of DockState attached property. By design this method should accepts objects of type RadSplitContainer
public static DockState GetDockState(DependencyObject obj)
Gets whether the element is excluded from the saving and loading logic of RadDocking's of layout.
public static bool GetExcludedFromLayoutSave(DependencyObject obj)
The object.
Returns:Gets the value of FloatingLocation attached property.
public static Point GetFloatingLocation(DependencyObject obj)
Point
Gets the value of FloatingSize attached property.
public static Size GetFloatingSize(DependencyObject obj)
Size
GetFloatingWindowState(DependencyObject)
WindowState
Gets the value of FloatingWindowState attached property.
public static WindowState GetFloatingWindowState(DependencyObject obj)
WindowState
Gets whether the elements is auto-generated from the Docking control or is set by the user as one.
public static bool GetIsAutoGenerated(DependencyObject obj)
The object.
Returns:Finds RadPane by visual element using the position of the element in the visual tree. This method implements internal logic of the RadDocking control that is able to associate a RadPane control to a visual element.
public static RadPane GetRadPane(UIElement element)
The element to associate with a RadPane control.
Returns:The RadPane control, associated with the provided visual element. This method returns null if not able to find appropriate RadPane control.
Gets the serialization tag.
public static string GetSerializationTag(DependencyObject obj)
The object.
Returns:Loads the layout.
Provides the behavior for the "measure" pass of Silverlight layout. Classes can override this method to define their own measure pass behavior.
protected override Size MeasureOverride(Size availableSize)
The available size that this object can give to child objects. Infinity can be specified as a value to indicate that the object will size to whatever content is available.
Returns:Size
The size that this object determines it needs during layout, based on its calculations of child object allotted sizes.
Raises the routed event. This method is called when the ActivePane property is changed.
protected virtual void OnActivePaneChanged(ActivePangeChangedEventArgs e)
The ActivePangeChangedEventArgs instance containing the event data.
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call .
public override void OnApplyTemplate()
Raises the event.
protected virtual void OnClose(StateChangeEventArgs args)
The StateChangeEventArgs instance containing the event data.
OnCreateAutomationPeer()
AutomationPeer
Returns class-specific System.Windows.Automation.Peers.AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
The type-specific System.Windows.Automation.Peers.AutomationPeer implementation.
Raises the event.
protected virtual void OnCustomElementLoading(LayoutSerializationCustomLoadingEventArgs args)
The LayoutSerializationCustomLoadingEventArgs instance containing the event data.
Called when a dock item is dragged.
protected virtual void OnDockingElementDragged(Point globalPosition, object draggedElement)
The global position of the mouse.
draggedElementobjectThe element that was dragged.
Call this method to notify the Docking control that a SplitContainer is being dragged by the user.
protected void OnDragContainer(RadSplitContainer container, Point globalMousePosition)
The container, dragged by the user.
globalMousePositionPointThe global position of the mouse.
Call this method to notify the Docking control that a SplitContainer is being dropped by the user.
protected bool OnDropContainer(RadSplitContainer container, Point globalMousePosition)
The container, dragged by the user.
globalMousePositionPointThe global position of the mouse.
Returns:True if the drop was successful; otherwise - false. A drop is successful if the element is dropped over the compass.
Raises the event.
protected virtual void OnElementCleaned(LayoutSerializationEventArgs args)
The LayoutSerializationEventArgs instance containing the event data.
Raises the event.
protected virtual void OnElementLayoutCleaning(LayoutSerializationCleaningEventArgs args)
The LayoutSerializationCleaningEventArgs instance containing the event data.
Raises the event.
protected virtual void OnElementLayoutSaving(LayoutSerializationSavingEventArgs args)
The LayoutSerializationSavingEventArgs instance containing the event data.
Raises the event.
protected virtual void OnElementLoaded(LayoutSerializationEventArgs args)
The LayoutSerializationEventArgs instance containing the event data.
Raises the event.
protected virtual void OnElementLoading(LayoutSerializationLoadingEventArgs args)
The LayoutSerializationEventArgs instance containing the event data.
Raises the event.
protected virtual void OnElementSaved(LayoutSerializationEventArgs args)
The LayoutSerializationEventArgs instance containing the event data.
Raises the event and sets from the active theme.
protected override void OnInitialized(EventArgs e)
The RoutedEventArgs that contains the event data.
Raises the event.
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
The NotifyCollectionChangedEventArgs instance containing the event data.
Called before the event occurs.
protected override void OnKeyDown(KeyEventArgs e)
Invoked when an unhandled System.Windows.Input.Keyboard.LostKeyboardFocus attached event reaches an element in its route that is derived from this class. Tries to close the AutoHideArea if possible.
protected override void OnLostKeyboardFocus(KeyboardFocusChangedEventArgs e)
The System.Windows.Input.KeyboardFocusChangedEventArgs that contains event data.
Raises the event.
protected virtual void OnPaneGroupCreated(ElementCreatedEventArgs args)
The ElementCreatedEventArgs instance containing the event data.
Raises the event.
protected virtual void OnPin(StateChangeEventArgs args)
The StateChangeEventArgs instance containing the event data.
Raises the event.
protected virtual bool OnPreviewClose(StateChangeEventArgs args)
The StateChangeEventArgs instance containing the event data.
Returns:Raises the event.
protected virtual bool OnPreviewPin(StateChangeEventArgs args)
The StateChangeEventArgs instance containing the event data.
Returns:Raises the event.
protected virtual bool OnPreviewShow(StateChangeEventArgs args)
The StateChangeEventArgs instance containing the event data.
Returns:Raises the event.
protected virtual void OnPreviewShowCompass(PreviewShowCompassEventArgs args)
The PreviewShowCompassEventArgs instance containing the event data.
Raises the event.
protected virtual bool OnPreviewUnpin(StateChangeEventArgs args)
The StateChangeEventArgs instance containing the event data.
Returns:Raises the event.
protected virtual void OnShow(StateChangeEventArgs args)
The StateChangeEventArgs instance containing the event data.
Raises the event.
protected virtual void OnSplitContainerCreated(ElementCreatedEventArgs args)
The ElementCreatedEventArgs instance containing the event data.
Raises the event.
protected virtual void OnToolWindowCreated(ElementCreatedEventArgs args)
The ElementCreatedEventArgs instance containing the event data.
Raises the event.
protected virtual void OnUnpin(StateChangeEventArgs args)
The StateChangeEventArgs instance containing the event data.
Opens a ToolWindow for a RadPane and returns the window.
protected virtual ToolWindow OpenInToolWindow(RadPane pane, bool openImmediately = true)
The RadPane for which to open the window.
openImmediatelyboolIndicates if the method will call the ShowWindow() method of the RadDocking. Default value is 'True'.
Returns:The newly opened window.
Opens a ToolWindow for a RadPaneGroup and returns the window.
protected virtual ToolWindow OpenInToolWindow(RadPaneGroup radPaneGroup, bool openImmediately = true)
The RadPaneGroup for which to open the window.
openImmediatelyboolIndicates if the method will call the ShowWindow() method of the RadDocking. Default value is 'True'.
Returns:The newly opened window.
Opens a ToolWindow for a RadSplitContainer and returns the window.
protected virtual ToolWindow OpenInToolWindow(RadSplitContainer container, bool openImmediately = true)
The RadSplitContainer for which to open the window.
openImmediatelyboolIndicates if the method will call the ShowWindow() method of the RadDocking. Default value is 'True'.
Returns:The newly opened window.
Resets the theme.
public void ResetTheme()
Saves the layout.
Sets the value of DockState attached property.
public static void SetDockState(DependencyObject obj, DockState value)
Sets whether the element is excluded from the saving and loading logic of RadDocking's of layout.
public static void SetExcludedFromLayoutSave(DependencyObject obj, bool value)
The object.
valueboolThe value.
Sets the value of FloatingLocation attached property.
public static void SetFloatingLocation(DependencyObject obj, Point value)
Sets the value of FloatingSize attached property.
public static void SetFloatingSize(DependencyObject obj, Size value)
Sets the value of FloatingWindowState attached property.
public static void SetFloatingWindowState(DependencyObject obj, WindowState value)
Sets whether the element is auto-generated from the Docking control or is set by the user as one.
public static void SetIsAutoGenerated(DependencyObject obj, bool value)
The object.
valueboolThe value.
Sets the serialization tag.
public static void SetSerializationTag(DependencyObject obj, string value)
The object.
valuestringThe value.
Events
Occurs when the active pane is changed.
public event EventHandler<ActivePangeChangedEventArgs> ActivePaneChanged
Occurs when a pane or a group is closed.
public event EventHandler<StateChangeEventArgs> Close
Occurs when an custom element starts loading.
public event EventHandler<LayoutSerializationCustomLoadingEventArgs> CustomElementLoading
Occurs when an element is cleaned up.
public event EventHandler<LayoutSerializationEventArgs> ElementCleaned
Occurs when an element starts cleaning up.
public event EventHandler<LayoutSerializationCleaningEventArgs> ElementLayoutCleaning
Occurs when an element starts saving.
public event EventHandler<LayoutSerializationSavingEventArgs> ElementLayoutSaving
Occurs when an element is loaded.
public event EventHandler<LayoutSerializationEventArgs> ElementLoaded
Occurs when an element starts loading.
public event EventHandler<LayoutSerializationLoadingEventArgs> ElementLoading
Occurs when an element is saved.
public event EventHandler<LayoutSerializationEventArgs> ElementSaved
Occurs when the layout change is ended.
public event EventHandler LayoutChangeEnded
Implements:
Occurs when the layout change is started.
public event EventHandler LayoutChangeStarted
Implements:
Occurs when an RadPaneGroup instance is automatically created by the RadDocking control.
public event EventHandler<ElementCreatedEventArgs> PaneGroupCreated
Occurs when the state of a RadPane is changed.
public event EventHandler<RadRoutedEventArgs> PaneStateChange
Occurs when a pane or a group is pined.
public event EventHandler<StateChangeEventArgs> Pin
Occurs when a pane or a group is closed.
public event EventHandler<StateChangeEventArgs> PreviewClose
Occurs when a pane or a group is pined.
public event EventHandler<StateChangeEventArgs> PreviewPin
Occurs when a pane or a group is shown.
public event EventHandler<StateChangeEventArgs> PreviewShow
Occurs before the compass is shown.
public event EventHandler<PreviewShowCompassEventArgs> PreviewShowCompass
Occurs when a pane or a group is unpinned.
public event EventHandler<StateChangeEventArgs> PreviewUnpin
Occurs when a pane or a group is shown.
public event EventHandler<StateChangeEventArgs> Show
Occurs when an RadSplitContainer instance is automatically created by the RadDocking control.
public event EventHandler<ElementCreatedEventArgs> SplitContainerCreated
Occurs when an ToolWindow instance is automatically created by the RadDocking control.
public event EventHandler<ElementCreatedEventArgs> ToolWindowCreated
Occurs when a pane or a group is unpinned.
public event EventHandler<StateChangeEventArgs> Unpin