Sdílet prostřednictvím


CustomStrokes.Remove Method

Removes a Strokes collection from a CustomStrokes collection.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

Syntax

'Declaration
Public Sub Remove ( _
    s As String _
)
'Usage
Dim instance As CustomStrokes 
Dim s As String

instance.Remove(s)
public void Remove(
    string s
)
public:
void Remove(
    String^ s
)
public function Remove(
    s : String
)

Parameters

Remarks

The same Strokes collection that was added with the s parameter is removed when this method is called.

CustomStrokes collections are sets of references to ink data and are not the actual data itself. This method removes only the Strokes collection from a snapshot of, or reference to, the data and does not remove the Strokes collection from the actual ink data. To delete the collection from the actual ink data, call the Ink.DeleteStrokes method.

A System.ArgumentException is raised if the name does not match an existing member of the CustomStrokes collection.

Examples

In this example, the Strokes collection that exists with the specified name within a CustomStrokes collection is removed. If a Strokes collection does not exist with the specified name, an exception is raised.

Private Sub RemoveCustomStrokes(ByVal mName As String, ByVal mInk As Ink)
    Try 
        ' if the name does not exist, an exception will be raised
        mInk.CustomStrokes.Remove(mName)
    Catch E As ArgumentException
        ' this exception is raised when the named collection does not exist 
    End Try 

End Sub
private void RemoveCustomStrokes(string mName, Ink mInk)
{
    try
    {
        // if the name does not exist, an exception will be raised
        mInk.CustomStrokes.Remove(mName);
    }
    catch (ArgumentException)
    {
        // this exception is raised when the named collection does not exist
    }

}

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

See Also

Reference

CustomStrokes Class

CustomStrokes Members

Microsoft.Ink Namespace

Ink.DeleteStrokes

Ink