StylusPointCollection コンストラクター
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
StylusPointCollection クラスの新しいインスタンスを初期化します。
オーバーロード
| 名前 | 説明 |
|---|---|
| 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>
StylusPointに追加するStylusPointCollection型のジェネリック IEnumerable。
例外
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に追加するStylusPoint オブジェクトを指定するStylusPointCollection型のジェネリック IEnumerable。
例外
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に格納される追加のプロパティを指定する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に格納される追加のプロパティを指定する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 コンストラクターを使用して新しいStylusPointCollectionを作成すると、指定した数のStylusPointCollection オブジェクトを保持する容量でStylusPointが作成されます。
StylusPoint メソッドを呼び出すことで、initialCapacityよりも多くのAddオブジェクトを追加できます。