Table of Contents

Method SaveProperties

Namespace
PaintDotNet
Assembly
PaintDotNet.Data.dll

SaveProperties()

Allows you to save the mutable properties of the layer so you can restore them later (esp. important for undo!). Mutable properties include the layer's name, whether it's visible, and the metadata. This list might expand later.

public virtual object SaveProperties()

Returns

object

An object that can be used later in a call to LoadProperties.

Remarks

It is important that derived classes call this in the correct fashion so as to 'chain' the properties list together. The following is the correct pattern:

public override object SaveProperties()
{
    object baseProperties = base.SaveProperties();
    return new List(properties.Clone(), new List(baseProperties, null));
}