語言

GeometryGroup 類別

定義

表示一個由其他 幾何 物件組成的複合幾何體。

public ref class GeometryGroup sealed : Geometry
/// [Microsoft.UI.Xaml.Markup.ContentProperty(Name="Children")]
/// [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 GeometryGroup final : Geometry
[Microsoft.UI.Xaml.Markup.ContentProperty(Name="Children")]
[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 GeometryGroup : Geometry
Public NotInheritable Class GeometryGroup
Inherits Geometry
<GeometryGroup>
  oneOrMoreGeometries
</GeometryGroup>
繼承
Object Platform::Object IInspectable DependencyObject Geometry GeometryGroup
屬性

範例

複合幾何物件可透過 GeometryGroup 建立。 GeometryGroup 物件會將其所包含的 Geometry 物件合併,且不會合併它們的面積。 可以將任意數量的 幾何 物件加入 GeometryGroup。 此範例使用 GeometryGroup 來建立複合幾何體。

<Canvas>
    <Path Stroke="Black" StrokeThickness="4" Fill="#CCCCFF">
        <Path.Data>

            <!-- Creates a composite shape from three geometries. -->
            <GeometryGroup FillRule="EvenOdd">
                <LineGeometry StartPoint="10,10" EndPoint="50,30" />
                <EllipseGeometry Center="40,70" RadiusX="30" RadiusY="30" />
                <RectangleGeometry Rect="30,55 100 30" />
            </GeometryGroup>
        </Path.Data>
    </Path>
</Canvas>

建構函式

名稱 Description
GeometryGroup()

初始化 GeometryGroup 類別的新實例。

屬性

名稱 Description
Bounds

會得到一個 Rect ,指定幾 何體軸對齊的邊界框。

(繼承來源 Geometry)
Children

取得或設定包含定義此 GeometryGroup 物件的 GeometryCollection。

ChildrenProperty

識別 子女 依賴性質。

Dispatcher

它總是在 Windows 應用程式 SDK 應用程式中回傳 null 。 改用 DispatcherQueue 。

(繼承來源 DependencyObject)
DispatcherQueue

得到 DispatcherQueue 這個物件所關聯的那個。 代表 DispatcherQueue 一個功能,即使程式碼是由非 UI 執行緒發起,也能存取 UI DependencyObject 執行緒。

(繼承來源 DependencyObject)
FillRule

取得或設定此 GeometryGroup 中物件相交區域如何組合。

FillRuleProperty

識別 FillRule 相依屬性。

Transform

取得或設定套用到 Geometry 的 Transform 物件。

(繼承來源 Geometry)

方法

名稱 Description
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)

適用於

另請參閱