Dela via


Visual.Size Property

Definition

The width and height of the visual. Animatable.

public:
 property float2 Size { float2 get(); void set(float2 value); };
float2 Size();

void Size(float2 value);
public Vector2 Size { get; set; }
var vector2 = visual.size;
visual.size = vector2;
Public Property Size As Vector2

Property Value

Vector2 Vector2

float2

The width and height of the visual.

Examples

See the code example in ContainerVisual.

Remarks

This property can be animated. Call CompositionObject.StartAnimation to associate it with a CompositionAnimation.

The effective size of a Visual is found by adding its Size to its RelativeSizeAdjustment combined with the effective size of the Parent Visual:

var Effective_Size = Size + (RelativeSizeAdjustment * Parent.Effective_Size).

Applies to