Click or drag to resize

WebImageViewerUndosAvailable Property

Returns the number of Undos available from the cache.

Namespace:  Atalasoft.Imaging.WebControls
Assembly:  Atalasoft.dotImage.WebControls (in Atalasoft.dotImage.WebControls.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
public int UndosAvailable { get; }

Property Value

Type: Int32
A value indicating how many undos are available in the cache.
Remarks
This value is only accurate after PreRender event, and should only be used for cosmetic purposes in the Render event.
Examples

This example demonstrates how to use the UndosAvailable property in conjunction with a button control.

Undos with a button C#
// We override Render because it is the only time this value is valid.
protected override void Render(HtmlTextWriter writer)
{
    if (this.WebImageViewer1.UndosAvailable < 1)
        this.Button1.Enabled = false;
    else
        this.Button1.Enabled = true;

    base.Render (writer);
}

// Button event handler
private void Button1_Click(object sender, System.EventArgs e)
{
    this.WebImageViewer1.Undo();
}
See Also