Vector.ExplicitVector.ExplicitVector.Explicit Operator

オーバーロード

 Explicit(Vector to Point) Explicit(Vector to Point) Explicit(Vector to Point) このベクターの Point および X の値を持つ Y を作成します。Creates a Point with the X and Y values of this vector. Explicit(Vector to Size) Explicit(Vector to Size) Explicit(Vector to Size) このベクターのオフセットから Size を作成します。Creates a Size from the offsets of this vector.

Explicit(Vector to Point)Explicit(Vector to Point)Explicit(Vector to Point)

このベクターの Point および X の値を持つ Y を作成します。Creates a Point with the X and Y values of this vector.

``````public:
static explicit operator System::Windows::Point(System::Windows::Vector vector);``````
``public static explicit operator System.Windows.Point (System.Windows.Vector vector);``
``static member op_Explicit : System.Windows.Vector -> System.Windows.Point``

パラメーター

vector
Vector Vector Vector

戻り値

`vector`X および Y のオフセット値と等しい X および Y の座標値を持つポイント。A point with X- and Y-coordinate values equal to the X and Y offset values of `vector`.

例

``````private Point overloadedExplicitOperatorExample2()
{
Vector vector1 = new Vector(20, 30);

// Explicitly converts a Vector structure into a Point structure.
// returnPoint is equal to (20, 30).
Point returnPoint = (Point)vector1;

return returnPoint;

}
``````
``````Private Function overloadedExplicitOperatorExample2() As Point
Dim vector1 As New Vector(20, 30)

' Explicitly converts a Vector structure into a Point structure.
' returnPoint is equal to (20, 30).
Dim returnPoint As Point = CType(vector1, Point)

Return returnPoint

End Function
``````

Explicit(Vector to Size)Explicit(Vector to Size)Explicit(Vector to Size)

このベクターのオフセットから Size を作成します。Creates a Size from the offsets of this vector.

``````public:
static explicit operator System::Windows::Size(System::Windows::Vector vector);``````
``public static explicit operator System.Windows.Size (System.Windows.Vector vector);``
``static member op_Explicit : System.Windows.Vector -> System.Windows.Size``

パラメーター

vector
Vector Vector Vector

戻り値

このベクターの Size プロパティの絶対値と等しい Width と、このベクターの X プロパティの絶対値と等しい Height を持つ YA Size with a Width equal to the absolute value of this vector's X property and a Height equal to the absolute value of this vector's Y property.

例

``````private Size overloadedExplicitOperatorExample1()
{
Vector vector1 = new Vector(20, 30);

// Explicitly converts a Vector structure into a Size structure.
// returnSize has a width of 20 and a height of 30.
Size returnSize = (Size)vector1;

return returnSize;

}
``````
``````Private Function overloadedExplicitOperatorExample1() As Size
Dim vector1 As New Vector(20, 30)

' Explicitly converts a Vector structure into a Size structure.
' returnSize has a width of 20 and a height of 30.
Dim returnSize As Size = CType(vector1, Size)

Return returnSize

End Function
``````