In This Article

DockSiteLayoutSerializer Class

Provides DockSite layout serialization and deserialization functionality.

public class DockSiteLayoutSerializer : XmlSerializerBase<DockSite, XmlDockSiteLayout>
Inheritance:
object XmlSerializerBase<DockSite, XmlDockSiteLayout> object

Constructors

DockSiteLayoutSerializer()

Initializes an instance of the class.

public DockSiteLayoutSerializer()

DockSiteLayoutSerializer(XmlDockSiteLayout)

Initializes an instance of the class.

public DockSiteLayoutSerializer(XmlDockSiteLayout layout)
Parameter Type Description
layout XmlDockSiteLayout

The root XmlDockSiteLayout node.

Properties

CanKeepExistingDocumentWindowsOpen

Indicates whether existing open document windows are kept open during a layout serialization that affects the MDI area, unless they are listed in the loaded layout data.

public bool CanKeepExistingDocumentWindowsOpen { get; set; }

Property Value

bool:

true if existing open document windows are kept open during a layout serialization that affects the MDI area, unless they are listed in the loaded layout data; otherwise, false. The default value is false.

Remarks

If the deserialized layout data specifies that a particular document window is closed, it will not be reopened, even if it was open at the time of layout deserialization.

CanSerializeUnusedLazyLoadData

Indicates whether unused lazy load data can be serialized.

public bool CanSerializeUnusedLazyLoadData { get; set; }

Property Value

bool:

true if unused lazy load data can be serialized; otherwise, false. The default value is false.

Remarks

When a layout is deserialized and either ToolWindowDeserializationBehavior or DocumentWindowDeserializationBehavior are LazyLoad, lazy load data is stored for the windows if windows in the layout are not yet registered with the DockSite. If they later become registered, their lazy load data allows them to be restored to their previous location in the layout. If a layout is serialized without one of these windows being registered, normally it will discard the lazy load data so that it does not accumulate over time. Change this property to true to allow that lazy load data to be retained during serialization.

DocumentWindowDeserializationBehavior

The DocumentWindow deserialization behavior.

public DockingWindowDeserializationBehavior DocumentWindowDeserializationBehavior { get; set; }

Property Value

DockingWindowDeserializationBehavior

SerializationBehavior

The DockSite serialization behavior.

public DockSiteSerializationBehavior SerializationBehavior { get; set; }

Property Value

DockSiteSerializationBehavior

ToolWindowDeserializationBehavior

The ToolWindow deserialization behavior.

public DockingWindowDeserializationBehavior ToolWindowDeserializationBehavior { get; set; }

Property Value

DockingWindowDeserializationBehavior

Methods

ApplyTo(DockSite)

Applies the information contained within this serializer to the specified object.

public override void ApplyTo(DockSite obj)
Parameter Type Description
obj DockSite

The object to update with deserialized information.

CreateRootNodeFor(DockSite)

Creates a root node for the specified object.

public override XmlDockSiteLayout CreateRootNodeFor(DockSite obj)
Parameter Type Description
obj DockSite

The object for which to create a root node.

Returns

XmlDockSiteLayout:

The root node that was created.

GetXmlSerializer()

Returns the System.Xml.Serialization.XmlSerializer to use for serialization and deserialization.

protected override XmlSerializer GetXmlSerializer()

Returns

XmlSerializer

OnDockingWindowDeserializing(DockingWindowDeserializingEventArgs)

Invoked just before the DockingWindowDeserializing event.

protected virtual void OnDockingWindowDeserializing(DockingWindowDeserializingEventArgs eventArgs)
Parameter Type Description
eventArgs DockingWindowDeserializingEventArgs

The DockingWindowDeserializingEventArgs instance containing the event data.

Events

DockingWindowDeserializing

Occurs when an object is deserialized.

public event EventHandler<DockingWindowDeserializingEventArgs>? DockingWindowDeserializing

Event Type

EventHandler<DockingWindowDeserializingEventArgs>

Inherited Members

Extension Methods