Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Removes an ExtendedProperty object from the ExtendedProperties collection.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Syntax
'Declaration
Public Sub Remove ( _
id As Guid _
)
'Usage
Dim instance As ExtendedProperties
Dim id As Guid
instance.Remove(id)
public void Remove(
Guid id
)
public:
void Remove(
Guid id
)
public function Remove(
id : Guid
)
Parameters
id
Type: System.GuidThe globally unique identifier (GUID) of the ExtendedProperty object to remove from the ExtendedProperties collection.
Remarks
This method removes the ExtendedProperty object only from a snapshot of, or reference to, the ink data and does not remove the ExtendedProperty object from the actual ink data.
Examples
In this example, each Stroke object in a Strokes collection is examined. If the ExtendedProperties of the Stroke contains properties associated with special timestamp Guid objects, the ExtendedProperty is removed from the collection.
Private Sub RemoveAllTimeStampProperties()
' STROKE_START_GUID and STROKE_END_GUID
' are class level string const set via GUID generator
Dim strokeStartGuid As Guid = New Guid(STROKE_START_GUID)
Dim strokeEndGuid As Guid = New Guid(STROKE_END_GUID)
' access the Strokes property via using statement
' to insure that the object mStrokes is disposed when finished
' Otherwise, you will have a memory leak
Using mStrokes As Strokes = mInkObject.Ink.Strokes
For Each S As Stroke In mStrokes
If S.ExtendedProperties.Contains(strokeStartGuid) Then
S.ExtendedProperties.Remove(strokeStartGuid)
End If
If S.ExtendedProperties.Contains(strokeEndGuid) Then
S.ExtendedProperties.Remove(strokeEndGuid)
End If
Next
End Using
End Sub
private void RemoveAllTimeStampProperties()
{
// STROKE_START_GUID and STROKE_END_GUID
// are class level string const set via GUID generator
Guid strokeStartGuid = new Guid(STROKE_START_GUID);
Guid strokeEndGuid = new Guid(STROKE_END_GUID);
// access the Strokes property via using statement
// to insure that the object mStrokes is disposed when finished
// Otherwise, you will have a memory leak
using (Strokes mStrokes = mInkObject.Ink.Strokes)
{
foreach (Stroke S in mStrokes)
{
if (S.ExtendedProperties.Contains(strokeStartGuid))
{
S.ExtendedProperties.Remove(strokeStartGuid);
}
if (S.ExtendedProperties.Contains(strokeEndGuid))
{
S.ExtendedProperties.Remove(strokeEndGuid);
}
}
}
}
Platforms
Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 3.0