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

Provides the XML serialization functionality for RadLayoutControl.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class LayoutControlXmlSerializer : ComponentXmlSerializer

Inheritance: objectComponentXmlSerializerLayoutControlXmlSerializer

Inherited Members ComponentXmlSerializer.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.GetPropertyValue(PropertyDescriptor, 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.InitializeWrite()ComponentXmlSerializer.InitializeRead()ComponentXmlSerializer.GetCollectionElementOverride(IEnumerable, 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 that can match serialized layout items and associated controls to existing objects by name.

C#
public LayoutControlXmlSerializer(RadLayoutControl layoutControl, ComponentXmlSerializationInfo componentSerializationInfo)
Parameters:layoutControlRadLayoutControl

The layout control whose existing items and controls can be reused while loading.

componentSerializationInfoComponentXmlSerializationInfo

The property serialization settings passed to the base serializer.

Methods

Returns null for an empty name; otherwise reuses matching Items or ItemGroups entries and falls back to the base matcher when no name match exists.

C#
protected override object MatchExistingItem(XmlReader reader, IList toRead, object parent, PropertyDescriptor parentProperty, string propertyToMatch, string uniquePropertyValue, IList existingInstancesToMatch, ref int foundAtIndex)
Parameters:readerXmlReader

The XML reader for the serialized item.

toReadIList

The collection being populated from the XML.

parentobject

The object that owns the collection.

parentPropertyPropertyDescriptor

The property descriptor for the collection being populated.

propertyToMatchstring

The property name used by the base serializer when matching existing objects.

uniquePropertyValuestring

The serialized value used to find a named layout item.

existingInstancesToMatchIList

The existing objects available to the base matcher.

foundAtIndexint

Receives the base matcher's index; remains -1 for items matched by this serializer's name lookup.

Returns:

object

Overrides: ComponentXmlSerializer.MatchExistingItem(XmlReader, IList, object, PropertyDescriptor, string, string, IList, ref int)

Reads layout item collections by matching existing items by name, creating missing items, and removing unmatched items from the collection. Unmatched existing items are scheduled for disposal; other collection types are left to the base deserializer.

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

The XML reader positioned at the collection data.

listOwnerobject

The object that owns the collection.

ownerPropertyPropertyDescriptor

The descriptor for the collection property.

listIList

The existing collection being populated.

Returns:

bool

true when this method handled a layout-item collection; otherwise, false.

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

Resolves a serialized associated-control name to an existing control before applying other property values normally.

C#
protected override void SetPropertyValue(PropertyDescriptor property, object propertyOwner, object value)
Parameters:propertyPropertyDescriptor

The property being assigned.

propertyOwnerobject

The object that owns the property.

valueobject

The deserialized property value.

Overrides: ComponentXmlSerializer.SetPropertyValue(PropertyDescriptor, object, object)