다음을 통해 공유


Strokes.Remove 메서드 (Strokes)

업데이트: 2007년 11월

Strokes 컬렉션에서 Strokes 컬렉션을 제거합니다.

네임스페이스:  Microsoft.Ink
어셈블리:  Microsoft.Ink(Microsoft.Ink.dll)

구문

‘선언
Public Sub Remove ( _
    strokes As Strokes _
)
‘사용 방법
Dim instance As Strokes
Dim strokes As Strokes

instance.Remove(strokes)
public void Remove(
    Strokes strokes
)
public:
void Remove(
    Strokes^ strokes
)
public void Remove(
    Strokes strokes
)
public function Remove(
    strokes : Strokes
)

매개 변수

설명

Strokes 컬렉션은 실제 데이터가 아니라 잉크 데이터에 대한 참조 집합입니다. Remove 메서드는 실제 잉크 데이터가 아닌 잉크 데이터 참조를 제거합니다. 실제 잉크 데이터를 삭제하려면 Ink.DeleteStrokes 메서드를 호출합니다.

Remove 메서드를 호출하면 컬렉션의 개체가 다시 정렬됩니다. 예를 들어 Microsoft Visual Basic.NET에서 Strokes.Remove(Strokes.Item(0))를 호출하면 Strokes.Item(1)이 Strokes.Item(0)이 되고 Strokes.Item(2)가 Strokes.Item(1)이 되는 방식입니다.

예제

이 C# 예제에서는 Stroke의 첫 번째 점이 Stroke의 마지막 점보다 왼쪽에 있지 않으면 보다 큰 Strokes 컬렉션인 theLeftToRightStokes에서 Strokes 컬렉션인 strokesToRemove를 제거합니다. Ink 개체의 원래 데이터는 영향을 받지 않습니다.

//...
Strokes strokesToRemove = theLeftToRightStrokes.Ink.CreateStrokes();
foreach (Stroke testStroke in theLeftToRightStrokes)
{
    Point ptStart = testStroke.GetPoint(0);
    Point ptEnd = testStroke.GetPoint(testStroke.PacketCount - 1);
    if (ptStart.X > ptEnd.X)
        strokesToRemove.Add(testStroke);
}
theLeftToRightStrokes.Remove(strokesToRemove);

이 Visual Basic .NET 예제에서는 Stroke의 첫 번째 점이 Stroke의 마지막 점보다 왼쪽에 있지 않으면 보다 큰 Strokes 컬렉션인 theLeftToRightStokes에서 Strokes 컬렉션인 strokesToRemove를 제거합니다. Ink 개체의 원래 데이터는 영향을 받지 않습니다.

'...
Dim testStroke As Stroke
Dim strokesToRemove As Strokes = theLeftToRightStrokes.Ink.CreateStrokes()
For Each testStroke In theLeftToRightStrokes
    Dim ptStart As Point = testStroke.GetPoint(0)
    Dim ptEnd As Point = testStroke.GetPoint(testStroke.PacketCount - 1)
    If ptStart.X > ptEnd.X Then
       strokesToRemove.Add(testStroke)
    End If
Next
theLeftToRightStrokes.Remove(strokesToRemove)

플랫폼

Windows Vista

.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

3.0에서 지원

참고 항목

참조

Strokes 클래스

Strokes 멤버

Remove 오버로드

Microsoft.Ink 네임스페이스

Strokes.RemoveAt

Stroke

Strokes