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

Serializes RadDock layout data with placeholders for dock windows and resolves those placeholders to existing windows when reading.

Definition

Namespace:Telerik.WinControls.UI.Docking.Serialization

Assembly:Telerik.WinControls.RadDock.dll

Syntax:

C#
public class FloatingWindowsXmlResolvingSerializer : DockXmlSerializerBase

Inheritance: objectComponentXmlSerializerDockXmlSerializerBaseFloatingWindowsXmlResolvingSerializer

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.DisposeObject(IDisposable)ComponentXmlSerializer.ReadObjectElementOverride(XmlReader, object)ComponentXmlSerializer.ReadElementInObject(XmlReader, PropertyDescriptor, object)ComponentXmlSerializer.ProcessTypeOverride(Type, XmlReader, PropertyDescriptor, object)ComponentXmlSerializer.SetPropertyValue(PropertyDescriptor, object, object)ComponentXmlSerializer.GetPropertyValue(PropertyDescriptor, object)ComponentXmlSerializer.WriteTypeAttribute(XmlWriter, Type, object, DesignerSerializationVisibility)ComponentXmlSerializer.WritePropertyOverride(XmlWriter, PropertyDescriptor, object, DesignerSerializationVisibility)ComponentXmlSerializer.ShouldSerializeValue(object, PropertyDescriptor, PropertySerializationMetadata)ComponentXmlSerializer.WriteDictionaryElement(XmlWriter, IDictionary, object, PropertyDescriptor)ComponentXmlSerializer.InitializeWrite()ComponentXmlSerializer.InitializeRead()ComponentXmlSerializer.WriteCollectionElement(XmlWriter, IEnumerable, string)ComponentXmlSerializer.WriteCollectionElement(XmlWriter, IEnumerable, object, PropertyDescriptor)ComponentXmlSerializer.RootSerializationObjectComponentXmlSerializer.PropertiesProviderComponentXmlSerializer.ResolveTypesOnlyInTelerikAssembliesComponentXmlSerializer.InstanceFactory...

Constructors

Creates a serializer that resolves layout data against the windows owned by the specified dock.

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

The dock whose window instances are matched during deserialization.

componentSerializationInfoComponentXmlSerializationInfo

The property and type metadata used to read and write the layout.

Methods

Adds floating windows to the serialized controls of the tab strip recorded as their redock target.

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 augmented controls for a matching tab-strip collection, or the base serializer's collection otherwise.

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

Uses placeholder element types for dock windows and serializable snapshots for floating windows.

C#
protected override string GetElementNameByType(Type elementType)
Parameters:elementTypeType

The runtime type being written.

Returns:

string

The XML element type name used for the specified type.

Overrides: ComponentXmlSerializer.GetElementNameByType(Type)

Merges control collections by dock-window name for tab-strip panels and by control name for other owners.

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

The reader positioned at the collection data.

propertyOwnerobject

The object that owns the collection.

parentPropertyPropertyDescriptor

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 the collection was handled here.

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

Replaces live dock and floating windows with serializable representations before writing them.

C#
public override void WriteObjectElement(XmlWriter writer, object toWrite)
Parameters:writerXmlWriter

The writer receiving the object element.

toWriteobject

The object to serialize.

Overrides: ComponentXmlSerializer.WriteObjectElement(XmlWriter, object)