共用方式為


Ink.Dirty Property

Ink.Dirty Property

Gets or sets the value that indicates whether an Ink object has been modified since the last time the ink was saved.

Definition

Visual Basic .NET Public Property Dirty As Boolean
C# public bool Dirty { get; set; }
Managed C++ public: __property bool* get_Dirty();
public: __property void set_Dirty(bool*);

Property Value

System.Boolean. Whether an Ink object has been modified since the last time the ink was saved.

This property is read/write.

true The ink has been modified since the last time the ink was saved.
false Default. The ink has not been modified since the last time the ink was saved.

Exceptions

ObjectDisposedException Leave Site: The Ink object is disposed.

Remarks

After ink is saved, the Dirty property is automatically cleared and the value of this property is set to false. To save an Ink object, call the Save method.

Examples

[C#]

This C# example creates message boxes to show how the Dirty property of an Ink object, theInk, changes when strokes are deleted after you call the Save method.

byte[] inkData = theInk.Save();
// Will pop up the message "False"
MessageBox.Show(theInk.Dirty.ToString());
theInk.DeleteStrokes();
// Will pop up the message "True" if theInk had strokes that were deleted
MessageBox.Show(theInk.Dirty.ToString());
                

[VB.NET]

This Microsoft® Visual Basic® .NET example creates message boxes to show how the Dirty property of an Ink object, theInk, changes when strokes are deleted after you call the Save method.

Dim inkData As Byte() = theInk.Save
'Will pop up the message "False"
MessageBox.Show(theInk.Dirty.ToString())
theInk.DeleteStrokes()
'Will pop up the message "True" if theInk had strokes that were deleted
MessageBox.Show(theInk.Dirty.ToString())
                

See Also