다음을 통해 공유


StylusPointCollection.Add(StylusPointCollection) 메서드

정의

현재 StylusPointCollection에 지정된 StylusPointCollection을 추가합니다.

public:
 void Add(System::Windows::Input::StylusPointCollection ^ stylusPoints);
public void Add (System.Windows.Input.StylusPointCollection stylusPoints);
override this.Add : System.Windows.Input.StylusPointCollection -> unit
Public Sub Add (stylusPoints As StylusPointCollection)

매개 변수

stylusPoints
StylusPointCollection

현재 StylusPointCollection에 추가할 StylusPointCollection입니다.

예외

stylusPoints이(가) null인 경우

stylusPointsStylusPointDescriptionDescription 속성과 호환되지 않는 경우

예제

다음 예제에서는 수집 StylusPoint 개체는 OnStylusDown 사용자 지정 컨트롤의 메서드.

StylusPointCollection stylusPoints;

protected override void OnStylusDown(StylusDownEventArgs e)
{
    base.OnStylusDown(e);

    StylusPointCollection eventPoints = e.GetStylusPoints(this);

    // Create a new StylusPointCollection using the StylusPointDescription
    // from the stylus points in the StylusDownEventArgs.
    stylusPoints = new StylusPointCollection(eventPoints.Description, eventPoints.Count);
    stylusPoints.Add(eventPoints);
}
Private stylusPoints As StylusPointCollection


Protected Overrides Sub OnStylusDown(ByVal e As StylusDownEventArgs) 
    MyBase.OnStylusDown(e)
    
    Dim eventPoints As StylusPointCollection = e.GetStylusPoints(Me)
    
    ' Create a new StylusPointCollection using the StylusPointDescription
    ' from the stylus points in the StylusDownEventArgs.
    stylusPoints = New StylusPointCollection(eventPoints.Description, eventPoints.Count)
    stylusPoints.Add(eventPoints)

End Sub

적용 대상