Compartir a través de


Children (TransformGroup)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets the collection of child Transform objects.

<TransformGroup>
  oneOrMoreTransforms
</TransformGroup>
value = object.Children
object.Children = value

XAML Values

Value

Description

oneOrMoreTransforms

One or more object elements that derive from Transform. These can be one or more of the following: RotateTransform, ScaleTransform, SkewTransform, TranslateTransform, MatrixTransform, TransformGroup.

Property Value

Type: TransformCollection

The collection of child Transform objects.

This property is read/write. The default value is an empty collection.

Managed Equivalent

Children

Remarks

The XAML syntax for properties that use a TransformCollection is an example of an implicit collection syntax, where you can omit the TransformCollection object element as well as the <TransformGroup.Children> property element. Instead, you generally include one or more transform object elements (RotateTransform, ScaleTransform, SkewTransform, TranslateTransform, MatrixTransform, TransformGroup) as child elements of a TransformGroup. Explicitly including a TransformCollection object element is permissible XAML syntax and might be useful if you intend to name the collection in XAML and manipulate its contents through script later.

In a composite transformation, the order of individual transformations is significant. For example, rotate, scale, translate gives you a different result from translate, rotate, scale. One reason that order is significant is that transformations such as rotation and scaling are done with respect to the origin of the coordinate system. Scaling an object that is centered at the origin produces a different result from scaling an object that has been moved away from the origin. Similarly, rotating an object that is centered at the origin produces a different result from rotating an object that has been moved away from the origin.

Nesting TransformGroup elements is permitted.

Applies To

TransformGroup

See Also

Reference