다음을 통해 공유


ExtendedProperties.Remove 메서드 (Guid)

업데이트: 2007년 11월

ExtendedProperties 컬렉션에서 ExtendedProperty 개체를 제거합니다.

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

구문

‘선언
Public Sub Remove ( _
    id As Guid _
)
‘사용 방법
Dim instance As ExtendedProperties
Dim id As Guid

instance.Remove(id)
public void Remove(
    Guid id
)
public:
void Remove(
    Guid id
)
public void Remove(
    Guid id
)
public function Remove(
    id : Guid
)

매개 변수

설명

이 메서드는 잉크 데이터의 스냅숏이나 잉크 데이터를 가리키는 참조에서만 ExtendedProperty 개체를 제거하며 실제 잉크 데이터에서는 ExtendedProperty 개체를 제거하지 않습니다.

예제

이 예제에서는 Strokes 컬렉션의 각 Stroke 개체를 검사합니다. StrokeExtendedProperties에 특수 타임스탬프 GUID 개체와 연결된 속성이 포함되어 있는 경우 ExtendedProperty가 컬렉션에서 제거됩니다.

Private Sub RemoveAllTimeStampProperties()
    ' STROKE_START_GUID and STROKE_END_GUID
    ' are class level string const set via GUID generator
    Dim strokeStartGuid As Guid = New Guid(STROKE_START_GUID)
    Dim strokeEndGuid As Guid = New Guid(STROKE_END_GUID)

    ' access the Strokes property via using statement
    ' to insure that the object mStrokes is disposed when finished
    ' Otherwise, you will have a memory leak
    Using mStrokes As Strokes = mInkObject.Ink.Strokes
        For Each S As Stroke In mStrokes
            If S.ExtendedProperties.Contains(strokeStartGuid) Then
                S.ExtendedProperties.Remove(strokeStartGuid)
            End If
            If S.ExtendedProperties.Contains(strokeEndGuid) Then
                S.ExtendedProperties.Remove(strokeEndGuid)
            End If
        Next
    End Using
End Sub
private void RemoveAllTimeStampProperties()
{
    // STROKE_START_GUID and STROKE_END_GUID
    // are class level string const set via GUID generator
    Guid strokeStartGuid = new Guid(STROKE_START_GUID);
    Guid strokeEndGuid = new Guid(STROKE_END_GUID);

    // access the Strokes property via using statement
    // to insure that the object mStrokes is disposed when finished
    // Otherwise, you will have a memory leak
    using (Strokes mStrokes = mInkObject.Ink.Strokes)
    {
        foreach (Stroke S in mStrokes)
        {
            if (S.ExtendedProperties.Contains(strokeStartGuid))
            {
                S.ExtendedProperties.Remove(strokeStartGuid);
            }
            if (S.ExtendedProperties.Contains(strokeEndGuid))
            {
                S.ExtendedProperties.Remove(strokeEndGuid);
            }
        }
    }
}

플랫폼

Windows Vista

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

버전 정보

.NET Framework

3.0에서 지원

참고 항목

참조

ExtendedProperties 클래스

ExtendedProperties 멤버

Remove 오버로드

Microsoft.Ink 네임스페이스

ExtendedProperty

Ink