In This Article

BarLayoutXmlSerializer Class

Serializes BarManager layouts to XML.

public class BarLayoutXmlSerializer
Inheritance:
object object

Properties

BarManager

Gets the BarManager to that is managing the layout.

public BarManager BarManager { get; }

Property Value

BarManager:

The BarManager to that is managing the layout.

IsComplete

Gets whether to load/save a complete layout.

public bool IsComplete { get; }

Property Value

bool:

true if a complete layout should be loaded/saved; otherwise, a differential layout should be loaded/saved.

Reader

Gets the System.Xml.XmlReader to use for reading data.

public XmlReader Reader { get; }

Property Value

XmlReader:

The System.Xml.XmlReader to use for reading data.

Writer

Gets the System.Xml.XmlWriter to use for writing data.

public XmlWriter Writer { get; }

Property Value

XmlWriter:

The System.Xml.XmlWriter to use for writing data.

Methods

GetImageFromString(string)

Gets an Image from a base-64 encoded string.

public Image GetImageFromString(string imageData)
Parameter Type Description
imageData string

The encoded string to examine.

Returns

Image:

An Image from a base-64 encoded string.

GetStringFromImage(Image)

Gets a base-64 encoded string representing an Image.

public string GetStringFromImage(Image image)
Parameter Type Description
image Image

The Image to encode.

Returns

string:

A base-64 encoded string representing an Image.

ReadBooleanAttribute(string, string, bool)

Reads a node for a boolean attribute value.

public bool ReadBooleanAttribute(string tagName, string attributeName, bool defaultValue)
Parameter Type Description
tagName string

The name of the tag being examined.

attributeName string

The name of the attribute whose value is being returned.

defaultValue bool

The default value to return if the attribute is not specified.

Returns

bool

ReadDefaultableBooleanAttribute(string, string, DefaultableBoolean)

Reads a node for a DefaultableBoolean attribute value.

public DefaultableBoolean ReadDefaultableBooleanAttribute(string tagName, string attributeName, DefaultableBoolean defaultValue)
Parameter Type Description
tagName string

The name of the tag being examined.

attributeName string

The name of the attribute whose value is being returned.

defaultValue DefaultableBoolean

The default value to return if the attribute is not specified.

Returns

DefaultableBoolean

ReadIntegerAttribute(string, string, int)

Reads a node for an integer attribute value.

public int ReadIntegerAttribute(string tagName, string attributeName, int defaultValue)
Parameter Type Description
tagName string

The name of the tag being examined.

attributeName string

The name of the attribute whose value is being returned.

defaultValue int

The default value to return if the attribute is not specified.

Returns

int

ReadPointAttribute(string, string, Point)

Reads a node for a Point attribute value.

public Point ReadPointAttribute(string tagName, string attributeName, Point defaultValue)
Parameter Type Description
tagName string

The name of the tag being examined.

attributeName string

The name of the attribute whose value is being returned.

defaultValue Point

The default value to return if the attribute is not specified.

Returns

Point

ReadRectangleAttribute(string, string, Rectangle)

Reads a node for a Rectangle attribute value.

public Rectangle ReadRectangleAttribute(string tagName, string attributeName, Rectangle defaultValue)
Parameter Type Description
tagName string

The name of the tag being examined.

attributeName string

The name of the attribute whose value is being returned.

defaultValue Rectangle

The default value to return if the attribute is not specified.

Returns

Rectangle

ReadRequiredAttribute(string, string)

Reads a node for a required attribute and throws an exception if it doesn't exist.

public string ReadRequiredAttribute(string tagName, string attributeName)
Parameter Type Description
tagName string

The name of the tag being examined.

attributeName string

The name of the attribute whose value is being returned.

Returns

string

ReadSizeAttribute(string, string, Size)

Reads a node for a Size attribute value.

public Size ReadSizeAttribute(string tagName, string attributeName, Size defaultValue)
Parameter Type Description
tagName string

The name of the tag being examined.

attributeName string

The name of the attribute whose value is being returned.

defaultValue Size

The default value to return if the attribute is not specified.

Returns

Size

ReadStringAttribute(string, string, string)

Reads a node for a string attribute value.

public string ReadStringAttribute(string tagName, string attributeName, string defaultValue)
Parameter Type Description
tagName string

The name of the tag being examined.

attributeName string

The name of the attribute whose value is being returned.

defaultValue string

The default value to return if the attribute is not specified.

Returns

string

ThrowException(string)

Throws a basic exception.

public void ThrowException(string message)
Parameter Type Description
message string

The message to include in the exception.

ThrowUnrecognizedTagException(string)

Throws a exception when an unrecognized tag is located.

public void ThrowUnrecognizedTagException(string parentTagName)
Parameter Type Description
parentTagName string

The name of the parent tag where the problem occurred.

Inherited Members