PathFigure クラス

定義

ジオメトリのサブセクションである 1 つに接続された一連の 2 次元幾何学セグメントを表します。

public ref class PathFigure sealed : DependencyObject
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.UI.Xaml.Markup.ContentProperty(Name="Segments")]
class PathFigure final : DependencyObject
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.UI.Xaml.Markup.ContentProperty(Name="Segments")]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class PathFigure final : DependencyObject
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.UI.Xaml.Markup.ContentProperty(Name="Segments")]
public sealed class PathFigure : DependencyObject
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.UI.Xaml.Markup.ContentProperty(Name="Segments")]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class PathFigure : DependencyObject
Public NotInheritable Class PathFigure
Inherits DependencyObject
<PathFigure .../>
-or-
<PathFigure ...>
  oneOrMorePathSegments
</PathFigure
継承
Object Platform::Object IInspectable DependencyObject PathFigure
属性

Windows の要件

デバイス ファミリ
Windows 10 (10.0.10240.0 で導入)
API contract
Windows.Foundation.UniversalApiContract (v1.0 で導入)

次の使用例は、LineSegment を含む単一の PathFigure で構成される単純な PathGeometry を作成し、Path 要素を使用して表示します。 PathFigure オブジェクトの StartPoint は (10,20) に設定され、LineSegment はエンドポイント (100,130) で定義されます。

<Canvas>
    <Path Stroke="Black" StrokeThickness="4">
        <Path.Data>
            <PathGeometry>
                <PathGeometry.Figures>
                    <PathFigure StartPoint="10,20">
                        <PathFigure.Segments>
                            <LineSegment Point="100,130"/>
                        </PathFigure.Segments>
                    </PathFigure>
                </PathGeometry.Figures>
            </PathGeometry>
        </Path.Data>
    </Path>
</Canvas>
<Canvas>
    <Path Stroke="Black" StrokeThickness="4" >
        <Path.Data>
            <PathGeometry>
                <PathGeometry.Figures>
                    <PathFigure StartPoint="10,50">
                        <PathFigure.Segments>
                            <BezierSegment Point1="100,0"
                                           Point2="200,200"
                                           Point3="300,100"/>
                            <LineSegment Point="400,100" />
                            <ArcSegment Size="50,50" 
                                        RotationAngle="45"
                                        IsLargeArc="True" 
                                        SweepDirection="Clockwise"
                                        Point="200,100"/>
                        </PathFigure.Segments>
                    </PathFigure>
                </PathGeometry.Figures>
            </PathGeometry>
        </Path.Data>
    </Path>
</Canvas>

注釈

PathFigureCollection は、PathFigure アイテムの厳密に型指定されたコレクションです。 PathFigureCollection は、 PathGeometry.Figures プロパティで使用される型です。 XAML で、このプロパティに 1 つ以上の PathFigure 要素を指定します。

このクラスは、 Path または PathIcon のベクター データを設定する場合に関連します。

インスタンスまたはオブジェクト要素を作成するのではなく、Move コマンドおよび 描画コマンド構文の文字列内のベクターの一部としてセグメントと単一の PathFigure を定義することもできます。

コンストラクター

PathFigure()

PathFigure クラスの新しいインスタンスを初期化します。

プロパティ

Dispatcher

このオブジェクトが関連付けられている CoreDispatcher を取得します。 CoreDispatcher は、コードが UI 以外のスレッドによって開始された場合でも、UI スレッド上の DependencyObject にアクセスできる機能を表します。

(継承元 DependencyObject)
IsClosed

この図形の最初と最後のセグメントが接続されているかどうかを示す値を取得または設定します。

IsClosedProperty

IsClosed 依存関係プロパティを識別します。

IsFilled

この PathFigure の包含領域をヒット テスト、レンダリング、クリッピングに使用するかどうかを示す値を取得または設定します。

IsFilledProperty

IsFilled 依存関係プロパティを識別します。

Segments

この PathFigure オブジェクトの図形を定義するセグメントのコレクションを取得または設定します。

SegmentsProperty

Segments 依存関係プロパティを識別します。

StartPoint

PathFigure が開始するポイントを取得または設定します。

StartPointProperty

StartPoint 依存関係プロパティを識別します。

メソッド

ClearValue(DependencyProperty)

依存関係プロパティのローカル値をクリアします。

(継承元 DependencyObject)
GetAnimationBaseValue(DependencyProperty)

依存関係プロパティに対して確立された基本値を返します。これは、アニメーションがアクティブでない場合に適用されます。

(継承元 DependencyObject)
GetValue(DependencyProperty)

DependencyObject から依存関係プロパティの現在の有効な値を返します。

(継承元 DependencyObject)
ReadLocalValue(DependencyProperty)

ローカル値が設定されている場合は、依存関係プロパティのローカル値を返します。

(継承元 DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

この DependencyObject インスタンスの特定の DependencyProperty に対する変更をリッスンするための通知関数を登録します。

(継承元 DependencyObject)
SetValue(DependencyProperty, Object)

DependencyObject の依存関係プロパティのローカル値を設定します。

(継承元 DependencyObject)
UnregisterPropertyChangedCallback(DependencyProperty, Int64)

RegisterPropertyChangedCallback を呼び出して以前に登録した変更通知を取り消します。

(継承元 DependencyObject)

適用対象

こちらもご覧ください