GeometryGroup 類別

定義

代表由其他 Geometry 物件組成的複合幾何。

public ref class GeometryGroup sealed : Geometry
/// [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="Children")]
class GeometryGroup final : Geometry
/// [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="Children")]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class GeometryGroup final : Geometry
[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="Children")]
public sealed class GeometryGroup : Geometry
[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="Children")]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class GeometryGroup : Geometry
Public NotInheritable Class GeometryGroup
Inherits Geometry
<GeometryGroup>
  oneOrMoreGeometries
</GeometryGroup>
繼承
Object Platform::Object IInspectable DependencyObject Geometry GeometryGroup
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

範例

複合幾何物件可以使用 GeometryGroup 來建立。 GeometryGroup 物件會建立其包含 之 Geometry 物件的組織,而不會結合其區域。 任何數目的 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>

建構函式

GeometryGroup()

初始化 GeometryGroup 類別的新實例。

屬性

Bounds

取得 Rect ,指定 Geometry的軸對齊周框方塊。

(繼承來源 Geometry)
Children

取得或設定 GeometryCollection ,其中包含定義這個 GeometryGroup的物件。

ChildrenProperty

識別 Children 相依性屬性。

Dispatcher

取得這個 物件相關聯的 CoreDispatcherCoreDispatcher代表可在 UI 執行緒上存取DependencyObject的功能,即使程式碼是由非 UI 執行緒起始也一樣。

(繼承來源 DependencyObject)
FillRule

取得或設定如何結合這個 GeometryGroup 中包含的物件交集區域。

FillRuleProperty

識別 FillRule 相依性屬性。

Transform

取得或設定套用至GeometryTransform物件。

(繼承來源 Geometry)

方法

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)

適用於

另請參閱