PathFigure クラス

定義

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

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

次の使用例は、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 コマンドおよび draw コマンド構文の文字列内のベクターの一部としてセグメントと単一の PathFigure を定義することもできます。

コンストラクター

名前 説明
PathFigure()

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

プロパティ

名前 説明
Dispatcher

Windows アプリ SDK アプリで常に null を返します。 代わりに DispatcherQueue を使用してください。

(継承元 DependencyObject)
DispatcherQueue

このオブジェクトが関連付けられている DispatcherQueue を取得します。 DispatcherQueueは、コードが非 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)

適用対象

こちらもご覧ください