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 DockSiteLayoutSerializer class.

public DockSiteLayoutSerializer()

DockSiteLayoutSerializer(XmlDockSiteLayout)

Initializes an instance of the DockSiteLayoutSerializer class.

public DockSiteLayoutSerializer(XmlDockSiteLayout layout)
Parameter Type Description
layout XmlDockSiteLayout

The root XmlDockSiteLayout node.

Properties

CanKeepExistingDocumentWindowsOpen

Gets or sets 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

Gets or sets 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 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

Gets or sets the DocumentWindow deserialization behavior.

public DockingWindowDeserializationBehavior DocumentWindowDeserializationBehavior { get; set; }

Property Value

DockingWindowDeserializationBehavior:

The DocumentWindow deserialization behavior.

SerializationBehavior

Gets or sets the DockSite serialization behavior.

public DockSiteSerializationBehavior SerializationBehavior { get; set; }

Property Value

DockSiteSerializationBehavior:

The DockSite serialization behavior.

ToolWindowDeserializationBehavior

Gets or sets the ToolWindow deserialization behavior.

public DockingWindowDeserializationBehavior ToolWindowDeserializationBehavior { get; set; }

Property Value

DockingWindowDeserializationBehavior:

The ToolWindow deserialization behavior.

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:

The System.Xml.Serialization.XmlSerializer that was created.

RaiseDockingWindowDeserializing(DockingWindowDeserializingEventArgs)

Raises the DockingWindowDeserializing event with the specified arguments.

protected virtual void RaiseDockingWindowDeserializing(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