Visual.Size Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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 it's Size
to it's RelativeSizeAdjustment combined with the effective size of the Parent Visual
:
var Effective_Size = Size + (RelativeSizeAdjustment * Parent.Effective_Size)
.