New to Telerik UI for WinForms? Start a free 30-day trial

Reads and writes RadDock layouts while preserving window identities and their saved docking locations.

Definition

Namespace:Telerik.WinControls.UI.Docking.Serialization

Assembly:Telerik.WinControls.RadDock.dll

Syntax:

C#
public class DockXmlSerializer : DockXmlSerializerBase

Inheritance: objectComponentXmlSerializerDockXmlSerializerBaseDockXmlSerializer

Inherited Members DockXmlSerializerBase.MatchExistingItem(XmlReader, IList, object, PropertyDescriptor, string, string, IList, ref int)DockXmlSerializerBase.DockComponentXmlSerializer.ReadDictionaryElement(XmlReader, object, IDictionary)ComponentXmlSerializer.ReadCollectionElement(XmlReader, IList)ComponentXmlSerializer.ReadCollectionElement(XmlReader, object, IList)ComponentXmlSerializer.ReadCollectionElement(XmlReader, object, IList, bool)ComponentXmlSerializer.ReadMergeCollection(XmlReader, object, PropertyDescriptor, IList, string)ComponentXmlSerializer.ReadMergeCollection(XmlReader, object, PropertyDescriptor, IList, string, bool)ComponentXmlSerializer.ReadMergeCollection(XmlReader, object, PropertyDescriptor, IList, string, bool, bool)ComponentXmlSerializer.MatchObjectElement(XmlReader, object, PropertyDescriptor, IList, string, IList, out int)ComponentXmlSerializer.ReadObjectElement(XmlReader, object)ComponentXmlSerializer.ReadObjectElement(XmlReader, object, object)ComponentXmlSerializer.ProcessReaderAttribute(XmlReader, object, object, PropertyDescriptor)ComponentXmlSerializer.ProcessProperty(PropertyDescriptor)ComponentXmlSerializer.ReadObjectElementOverride(XmlReader, object)ComponentXmlSerializer.ReadElementInObject(XmlReader, PropertyDescriptor, object)ComponentXmlSerializer.ProcessTypeOverride(Type, XmlReader, PropertyDescriptor, object)ComponentXmlSerializer.SetPropertyValue(PropertyDescriptor, object, object)ComponentXmlSerializer.WriteTypeAttribute(XmlWriter, Type, object, DesignerSerializationVisibility)ComponentXmlSerializer.WriteObjectElement(XmlWriter, object)ComponentXmlSerializer.WritePropertyOverride(XmlWriter, PropertyDescriptor, object, DesignerSerializationVisibility)ComponentXmlSerializer.ShouldSerializeValue(object, PropertyDescriptor, PropertySerializationMetadata)ComponentXmlSerializer.WriteDictionaryElement(XmlWriter, IDictionary, object, PropertyDescriptor)ComponentXmlSerializer.WriteCollectionElement(XmlWriter, IEnumerable, string)ComponentXmlSerializer.WriteCollectionElement(XmlWriter, IEnumerable, object, PropertyDescriptor)ComponentXmlSerializer.GetElementNameByType(Type)ComponentXmlSerializer.RootSerializationObjectComponentXmlSerializer.PropertiesProviderComponentXmlSerializer.ResolveTypesOnlyInTelerikAssembliesComponentXmlSerializer.InstanceFactory...

Constructors

Creates a serializer and optionally prepares floating-window and auto-hide snapshots before writing.

C#
public DockXmlSerializer(RadDock dock, ComponentXmlSerializationInfo componentSerializationInfo, bool prepareFloatingAndAutoHideWindows)
Parameters:dockRadDock

The dock whose layout is serialized or restored.

componentSerializationInfoComponentXmlSerializationInfo

The property and type metadata used by the serializer.

prepareFloatingAndAutoHideWindowsbool

true to synchronize floating-window and auto-hide state before writing.

Creates a serializer that prepares floating-window and auto-hide snapshots before writing.

C#
public DockXmlSerializer(RadDock dock, ComponentXmlSerializationInfo componentSerializationInfo)
Parameters:dockRadDock

The dock whose layout is serialized or restored.

componentSerializationInfoComponentXmlSerializationInfo

The property and type metadata used by the serializer.

Methods

Hides unsited tool windows and detaches unsited dock windows from the target control before base disposal.

C#
protected override void DisposeObject(IDisposable toBeDisposed)
Parameters:toBeDisposedIDisposable

The object the deserializer is removing.

Overrides: ComponentXmlSerializer.DisposeObject(IDisposable)

Adds floating, auto-hidden, and hidden windows to their recorded redock strip, or to the first docked strip when no state is available.

C#
protected override IEnumerable GetCollectionElementOverride(IEnumerable list, object owner, PropertyDescriptor property)
Parameters:listIEnumerable

The controls currently in the collection.

ownerobject

The object that owns the collection.

propertyPropertyDescriptor

Metadata for the collection property.

Returns:

IEnumerable

The controls to serialize, including eligible dock windows not currently in the strip.

Overrides: ComponentXmlSerializer.GetCollectionElementOverride(IEnumerable, object, PropertyDescriptor)

Reads the splitter width from the dock's split-container element so XML reflects its active value.

C#
protected override object GetPropertyValue(PropertyDescriptor property, object propertyOwner)
Parameters:propertyPropertyDescriptor

The property being serialized.

propertyOwnerobject

The object whose property value is requested.

Returns:

object

The active split-container width for SplitterWidth, or the base serializer's value.

Overrides: ComponentXmlSerializer.GetPropertyValue(PropertyDescriptor, object)

Clears cached floating-window snapshots and auto-hide groups before reading a layout.

C#
protected override void InitializeRead()

Overrides: ComponentXmlSerializer.InitializeRead()

Prepares configured floating and auto-hide snapshots and identifies the first docked strip for serialization.

C#
protected override void InitializeWrite()

Overrides: ComponentXmlSerializer.InitializeWrite()

Merges serialized controls by name, temporarily disabling child-index updates while reading a tool strip.

C#
protected override bool ProcessListOverride(XmlReader reader, object listOwner, PropertyDescriptor ownerProperty, IList list)
Parameters:readerXmlReader

The reader positioned at the collection data.

listOwnerobject

The object that owns the collection.

ownerPropertyPropertyDescriptor

Metadata for the collection property being read.

listIList

The existing collection to update.

Returns:

bool

The base serializer's result for non-control collections; otherwise, whether this override handled the collection.

Overrides: ComponentXmlSerializer.ProcessListOverride(XmlReader, object, PropertyDescriptor, IList)