ExtendedProperties.Remove Method

ExtendedProperties.Remove Method

Removes an ExtendedProperty object from the ExtendedProperties collection.

Definition

Visual Basic .NET Public Sub Remove( _
ByVal ep As ExtendedProperty _
)
C# public void Remove(
ExtendedProperty ep
);
Managed C++ public: void Remove(
ExtendedProperty *ep
);

Parameters

ep Microsoft.Ink.ExtendedProperty. The ExtendedProperty object to remove from the ExtendedProperties collection.

Exceptions

ArgumentException Leave Site: One of the parameters is not valid. Either the specific ExtendedProperty object is not compatible with the assembly, or the ExtendedProperty object is not in the ExtendedProperties collection. The latter may occur if the ExtendedProperty has been previously removed.
COMException Leave Site:

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

[C#]

This C# example removes an ExtendedProperty object, theExtendedProperty, from the ExtendedProperties property of every Stroke object in the Strokes collection, theStrokes.

// Remove the ExtendedProperty object from the ExtendedProperties property of
// each stroke in the strokes collection.
foreach (Stroke theStroke in theStrokes)
{
    // Test for theExtendedProperty on this stroke.
    if (theStroke.ExtendedProperties.Contains(theExtendedProperty))
    {
        // Remove the extended property from this stroke's extended
        // properties list.
        theStroke.ExtendedProperties.Remove(theExtendedProperty);
    }
}
                

[VB.NET]

This Microsoft® Visual Basic® .NET example removes an ExtendedProperty object, theExtendedProperty, from the ExtendedProperties property of every Stroke object in the Strokes collection, theStrokes.

'Remove the ExtendedProperty object from the ExtendedProperties property of
'each stroke in the strokes collection.
For Each theStroke As Stroke In theStrokes
    'Test for theExtendedProperty on this stroke.
    If theStroke.ExtendedProperties.Contains(theExtendedProperty) Then
        'Remove the extended property from this stroke's extended
        'properties list.
        theStroke.ExtendedProperties.Remove(theExtendedProperty)
    End If
Next
                

See Also