StylusPointCollection 생성자

정의

StylusPointCollection 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the StylusPointCollection class.

오버로드

StylusPointCollection()

StylusPointCollection 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the StylusPointCollection class.

StylusPointCollection(IEnumerable<StylusPoint>)

지정된 StylusPointCollection 개체를 사용하여 StylusPoint 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the StylusPointCollection class with the specified StylusPoint objects.

StylusPointCollection(IEnumerable<Point>)

지정된 지점을 사용하여 StylusPointCollection 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the StylusPointCollection class with specified points.

StylusPointCollection(Int32)

지정된 수의 StylusPointCollection 개체를 초기값으로 포함할 수 있는 StylusPoint 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the StylusPointCollection class that may initially contain the specified number of StylusPoint objects.

StylusPointCollection(StylusPointDescription)

StylusPointCollection에 지정된 속성을 포함하는 StylusPointDescription 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the StylusPointCollection class that contains the properties specified in the StylusPointDescription.

StylusPointCollection(StylusPointDescription, Int32)

지정된 크기와 StylusPointCollection에 지정된 속성을 포함하는 StylusPointDescription 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the StylusPointCollection class that is the specified size and contains the properties specified in the StylusPointDescription.

StylusPointCollection()

StylusPointCollection 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the StylusPointCollection class.

public:
 StylusPointCollection();
public StylusPointCollection ();
Public Sub New ()

예제

다음 예제에서는 수집 StylusPoint 개체는 OnStylusDown 사용자 지정 컨트롤의 메서드.The following example collects StylusPoint objects in the OnStylusDown method of a custom control. 이 예에서는 만듭니다는 StylusPointCollection 지정 하 여는 StylusPointDescription 의 초기 크기를 StylusPointCollection.The example creates a StylusPointCollection by specifying the StylusPointDescription and the initial size of the StylusPointCollection.

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

StylusPointCollection(IEnumerable<StylusPoint>)

지정된 StylusPointCollection 개체를 사용하여 StylusPoint 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the StylusPointCollection class with the specified StylusPoint objects.

public:
 StylusPointCollection(System::Collections::Generic::IEnumerable<System::Windows::Input::StylusPoint> ^ stylusPoints);
public StylusPointCollection (System.Collections.Generic.IEnumerable<System.Windows.Input.StylusPoint> stylusPoints);
new System.Windows.Input.StylusPointCollection : seq<System.Windows.Input.StylusPoint> -> System.Windows.Input.StylusPointCollection
Public Sub New (stylusPoints As IEnumerable(Of StylusPoint))

매개 변수

stylusPoints
IEnumerable<StylusPoint>

StylusPoint에 추가할 StylusPointCollection 형식의 제네릭 IEnumerable입니다.A generic IEnumerable of type StylusPoint to add to the StylusPointCollection.

예외

stylusPointsnull인 경우stylusPoints is null.

points의 길이가 0입니다.The length of points is 0.

-또는--or- StylusPointstylusPoints 개체에 호환되지 않는 StylusPointDescription 개체가 있는 경우The StylusPoint objects in stylusPoints have incompatible StylusPointDescription objects.

예제

다음 예제에서는 StylusPointCollection합니다.The following example creates a StylusPointCollection.

StylusPoint stylusPoint1 =  new StylusPoint(100, 100, .5f);
StylusPoint stylusPoint2 = new StylusPoint(200, 200, .35f);

StylusPointCollection points = new StylusPointCollection(
    new StylusPoint[] { stylusPoint1, stylusPoint2 });
Dim stylusPoint1 As New StylusPoint(100, 100, 0.5F)
Dim stylusPoint2 As New StylusPoint(200, 200, 0.35F)

Dim points As New StylusPointCollection(New StylusPoint() {stylusPoint1, stylusPoint2})

StylusPointCollection(IEnumerable<Point>)

지정된 지점을 사용하여 StylusPointCollection 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the StylusPointCollection class with specified points.

public:
 StylusPointCollection(System::Collections::Generic::IEnumerable<System::Windows::Point> ^ points);
public StylusPointCollection (System.Collections.Generic.IEnumerable<System.Windows.Point> points);
new System.Windows.Input.StylusPointCollection : seq<System.Windows.Point> -> System.Windows.Input.StylusPointCollection
Public Sub New (points As IEnumerable(Of Point))

매개 변수

points
IEnumerable<Point>

Point에 추가할 StylusPoint 개체를 지정하는 StylusPointCollection 형식의 제네릭 IEnumerable입니다.A generic IEnumerable of type Point that specifies the StylusPoint objects to add to the StylusPointCollection.

예외

pointsnull인 경우points is null.

points의 길이가 0입니다.The length of points is 0.

예제

다음 예제에서는 StylusPointCollection합니다.The following example creates a StylusPointCollection.

StylusPointCollection points = new StylusPointCollection(new Point[]
    {
        new Point(100, 100),
        new Point(100, 200),
        new Point(200, 250),
        new Point(300, 300)
    });
Dim points As New StylusPointCollection(New Point() _
                        {New Point(100, 100), _
                         New Point(100, 200), _
                         New Point(200, 250), _
                         New Point(300, 300)})

StylusPointCollection(Int32)

지정된 수의 StylusPointCollection 개체를 초기값으로 포함할 수 있는 StylusPoint 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the StylusPointCollection class that may initially contain the specified number of StylusPoint objects.

public:
 StylusPointCollection(int initialCapacity);
public StylusPointCollection (int initialCapacity);
new System.Windows.Input.StylusPointCollection : int -> System.Windows.Input.StylusPointCollection
Public Sub New (initialCapacity As Integer)

매개 변수

initialCapacity
Int32

초기값으로 StylusPoint에 포함할 수 있는 StylusPointCollection 개체 수입니다.The number of StylusPoint objects the StylusPointCollection can initially contain.

예외

initialCapacity가 음수입니다.initialCapacity is negative.

예제

다음 예제에서는 수집 StylusPoint 개체는 OnStylusDown 사용자 지정 컨트롤의 메서드.The following example collects StylusPoint objects in the OnStylusDown method of a custom control. 이 예에서는 만듭니다는 StylusPointCollection 둘 다 지정 하 여는 StylusPointDescription 의 초기 크기를 StylusPointCollection.The example creates a StylusPointCollection by specifying both the StylusPointDescription and the initial size of the StylusPointCollection.

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

설명

사용 하는 경우는 StylusPointCollection 새 생성자 StylusPointCollection를 지정 합니다 initialCapacity합니다.When you use the StylusPointCollection constructor to create a new StylusPointCollection, you specify it's initialCapacity. 그러나 더 추가할 수 있습니다 StylusPoint 를 호출 하 여 개체를 Add 메서드.However, you can add more StylusPoint objects by calling the Add method.

StylusPointCollection(StylusPointDescription)

StylusPointCollection에 지정된 속성을 포함하는 StylusPointDescription 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the StylusPointCollection class that contains the properties specified in the StylusPointDescription.

public:
 StylusPointCollection(System::Windows::Input::StylusPointDescription ^ stylusPointDescription);
public StylusPointCollection (System.Windows.Input.StylusPointDescription stylusPointDescription);
new System.Windows.Input.StylusPointCollection : System.Windows.Input.StylusPointDescription -> System.Windows.Input.StylusPointCollection

매개 변수

stylusPointDescription
StylusPointDescription

StylusPointDescription에 저장된 추가 속성을 지정하는 StylusPoint입니다.A StylusPointDescription that specifies the additional properties stored in each StylusPoint.

예외

stylusPointDescriptionnull인 경우stylusPointDescription is null.

예제

다음 예제에서는 수집 StylusPoint 개체는 OnStylusDown 사용자 지정 컨트롤의 메서드.The following example collects StylusPoint objects in the OnStylusDown method of a custom control. 이 예에서는 만듭니다는 StylusPointCollection 지정 하 여는 StylusPointDescription 의 초기 크기를 StylusPointCollection.The example creates a StylusPointCollection by specifying the StylusPointDescription and the initial size of the StylusPointCollection.

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

설명

모든 StylusPoint 에 추가 된 개체를 StylusPointCollection 있어야를 StylusPointDescription 와 호환 되는 stylusPointDescription합니다.All StylusPoint objects added to the StylusPointCollection must have a StylusPointDescription that is compatible with stylusPointDescription.

StylusPointCollection(StylusPointDescription, Int32)

지정된 크기와 StylusPointCollection에 지정된 속성을 포함하는 StylusPointDescription 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the StylusPointCollection class that is the specified size and contains the properties specified in the StylusPointDescription.

public:
 StylusPointCollection(System::Windows::Input::StylusPointDescription ^ stylusPointDescription, int initialCapacity);
public StylusPointCollection (System.Windows.Input.StylusPointDescription stylusPointDescription, int initialCapacity);
new System.Windows.Input.StylusPointCollection : System.Windows.Input.StylusPointDescription * int -> System.Windows.Input.StylusPointCollection

매개 변수

stylusPointDescription
StylusPointDescription

StylusPointDescription에 저장된 추가 속성을 지정하는 StylusPoint입니다.A StylusPointDescription that specifies the additional properties stored in each StylusPoint.

initialCapacity
Int32

초기값으로 StylusPoint에 포함할 수 있는 StylusPointCollection 개체 수입니다.The number of StylusPoint objects the StylusPointCollection can initially contain.

예외

initialCapacity가 음수입니다.initialCapacity is negative.

stylusPointDescriptionnull인 경우stylusPointDescription is null.

예제

다음 예제에서는 수집 StylusPoint 개체는 OnStylusDown 사용자 지정 컨트롤의 메서드.The following example collects StylusPoint objects in the OnStylusDown method of a custom control. 이 예에서는 만듭니다는 StylusPointCollection 지정 하 여는 StylusPointDescription 의 초기 크기를 StylusPointCollection.The example creates a StylusPointCollection by specifying the StylusPointDescription and the initial size of the StylusPointCollection.

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

설명

사용 하는 경우는 StylusPointCollection 새 생성자 StylusPointCollectionStylusPointCollection 의 지정 된 수를 보유 하는 용량을 사용 하 여 만든 StylusPoint 개체입니다.When you use the StylusPointCollection constructor to create a new StylusPointCollection, the StylusPointCollection is created with the capacity to hold the specified number of StylusPoint objects. 더 추가할 수 있습니다 StylusPoint 개체 보다 initialCapacity 를 호출 하 여는 Add 메서드.You can add more StylusPoint objects than initialCapacity by calling the Add method.

적용 대상