Поделиться через


CustomStrokes.Remove - метод

Обновлен: Ноябрь 2007

Removes a Strokes collection from a CustomStrokes collection.

Пространство имен:  Microsoft.Ink
Сборка:  Microsoft.Ink (в Microsoft.Ink.dll)

Синтаксис

'Декларация
Public Sub Remove ( _
    s As String _
)
'Применение
Dim instance As CustomStrokes
Dim s As String

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

Параметры

Заметки

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.

Примеры

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
    }

}

Платформы

Windows Vista

Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.

Сведения о версии

.NET Framework

Поддерживается в версии: 3.0

См. также

Ссылки

CustomStrokes Класс

CustomStrokes - члены

Microsoft.Ink - пространство имен

Ink.DeleteStrokes

Ink