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


CustomStrokes.RemoveAt - метод

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

Removes a Strokes collection at the specified index of the CustomStrokes collection.

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

Синтаксис

'Декларация
Public Sub RemoveAt ( _
    i As Integer _
)
'Применение
Dim instance As CustomStrokes
Dim i As Integer

instance.RemoveAt(i)
public void RemoveAt(
    int i
)
public:
void RemoveAt(
    int i
)
public void RemoveAt(
    int i
)
public function RemoveAt(
    i : int
)

Параметры

Заметки

A CustomStrokes collection is a reference to ink data and is not the actual data itself. This method removes only the related collection from a snapshot of, or reference to, the ink data and does not remove the actual ink data. To delete the collection from the actual ink data, call the Ink.DeleteStrokes method.

A System.ArgumentOutOfRangeException is raised if the index does not match an existing member of the CustomStrokes collection. If for development purposes you are using Windows XP (not the Tablet Edition) with the Tablet PC SDK installed and the index does not match an existing member of the CustomStrokes collection, a System.Runtime.InteropServices is raised.

Примеры

In this example, the Strokes collection that exists at the specified index of a CustomStrokes collection is removed. If a Strokes collection does not exist at the specified index, an exception is raised.

Private Sub RemoveCustomStrokes(ByVal mIndex As Integer, ByVal mInk As Ink)
    Try
        ' if the indexed position does not exist, an exception will be raised
        mInk.CustomStrokes.RemoveAt(mIndex)

    Catch E As System.Runtime.InteropServices.COMException
        ' For Windows XP (not Tablet Edition) with Tablet PC SDK installed for development purposes
        ' this exception is raised when the indexed collection does not exist

    Catch E As ArgumentOutOfRangeException
        ' For Windows XP Tablet Edition and Vista
        ' this exception is raised when the indexed collection does not exist
    End Try
End Sub
private void RemoveCustomStrokes(int mIndex, Ink mInk)
{
    try
    {
        // if the indexed position does not exist, an exception will be raised
        mInk.CustomStrokes.RemoveAt(mIndex);
    }
    catch (System.Runtime.InteropServices.COMException)
    {
        // For Windows XP (not Tablet Edition) with Tablet PC SDK installed for development purposes
        // this exception is raised when the indexed collection does not exist
    }
    catch (ArgumentOutOfRangeException)
    {
        // For Windows XP Tablet Edition and Vista
        // this exception is raised when the indexed collection does not exist
    }

}

Платформы

Windows Vista

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

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

.NET Framework

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

См. также

Ссылки

CustomStrokes Класс

CustomStrokes - члены

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