StylusPointCollection 생성자
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
StylusPointCollection 클래스의 새 인스턴스를 초기화합니다.
오버로드
| Name | Description |
|---|---|
| StylusPointCollection() |
StylusPointCollection 클래스의 새 인스턴스를 초기화합니다. |
| StylusPointCollection(IEnumerable<StylusPoint>) |
지정된 StylusPointCollection 개체를 사용하여 클래스의 StylusPoint 새 인스턴스를 초기화합니다. |
| StylusPointCollection(IEnumerable<Point>) |
지정된 지점을 사용하여 클래스의 StylusPointCollection 새 인스턴스를 초기화합니다. |
| StylusPointCollection(Int32) |
처음에 지정된 수의 개체를 StylusPointCollection 포함할 수 있는 클래스의 StylusPoint 새 인스턴스를 초기화합니다. |
| StylusPointCollection(StylusPointDescription) |
에 지정된 StylusPointCollection속성을 포함하는 클래스의 StylusPointDescription 새 인스턴스를 초기화합니다. |
| StylusPointCollection(StylusPointDescription, Int32) |
지정된 크기이고 에 지정된 속성을 포함하는 클래스의 StylusPointCollection 새 인스턴스를 StylusPointDescription초기화합니다. |
StylusPointCollection()
StylusPointCollection 클래스의 새 인스턴스를 초기화합니다.
public:
StylusPointCollection();
public StylusPointCollection();
Public Sub New ()
예제
다음 예제에서는 StylusPoint 사용자 지정 컨트롤의 메서드에서 OnStylusDown 개체를 수집합니다. 이 예제에서는 의 초기 크기와 크기를 StylusPointCollection지정하여 StylusPointDescription 만듭니다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 새 인스턴스를 초기화합니다.
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>
에 추가할 제네릭 IEnumerable 형식 StylusPoint 입니다 StylusPointCollection.
예외
stylusPoints은 null입니다.
예제
다음 예제에서는 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 새 인스턴스를 초기화합니다.
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 하는 제네릭 IEnumerable 형식 StylusPoint 입니다StylusPointCollection.
예외
points은 null입니다.
길이 points 는 0입니다.
예제
다음 예제에서는 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 새 인스턴스를 초기화합니다.
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 수입니다.
예외
initialCapacity 가 음수입니다.
예제
다음 예제에서는 StylusPoint 사용자 지정 컨트롤의 메서드에서 OnStylusDown 개체를 수집합니다. 이 예제에서는 의 초기 크기와 크기를 StylusPointCollection모두 StylusPointDescription 지정하여 만듭니다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. 그러나 메서드를 호출하여 더 많은 StylusPoint 개체를 Add 추가할 수 있습니다.
적용 대상
StylusPointCollection(StylusPointDescription)
에 지정된 StylusPointCollection속성을 포함하는 클래스의 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
Public Sub New (stylusPointDescription As StylusPointDescription)
매개 변수
- stylusPointDescription
- StylusPointDescription
각각StylusPointDescription에 저장된 추가 속성을 지정하는 A StylusPoint 입니다.
예외
stylusPointDescription은 null입니다.
예제
다음 예제에서는 StylusPoint 사용자 지정 컨트롤의 메서드에서 OnStylusDown 개체를 수집합니다. 이 예제에서는 의 초기 크기와 크기를 StylusPointCollection지정하여 StylusPointDescription 만듭니다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 가 있어야 합니다.
적용 대상
StylusPointCollection(StylusPointDescription, Int32)
지정된 크기이고 에 지정된 속성을 포함하는 클래스의 StylusPointCollection 새 인스턴스를 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
Public Sub New (stylusPointDescription As StylusPointDescription, initialCapacity As Integer)
매개 변수
- stylusPointDescription
- StylusPointDescription
각각StylusPointDescription에 저장된 추가 속성을 지정하는 A StylusPoint 입니다.
- initialCapacity
- Int32
처음에 포함할 수 있는 StylusPoint 개체의 StylusPointCollection 수입니다.
예외
initialCapacity 가 음수입니다.
stylusPointDescription은 null입니다.
예제
다음 예제에서는 StylusPoint 사용자 지정 컨트롤의 메서드에서 OnStylusDown 개체를 수집합니다. 이 예제에서는 의 초기 크기와 크기를 StylusPointCollection지정하여 StylusPointDescription 만듭니다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 개체를 저장할 수 있는 용량으로 생성됩니다. 메서드를 호출하는 것보다 더 많은 StylusPoint 개체를 initialCapacity 추가할 수 Add 있습니다.