Visual.RelativeSizeAdjustment Property

Definition

Gets or sets the size of the visual with respect to the size of its parent visual.

C#
public Vector2 RelativeSizeAdjustment { get; set; }

Property Value

Vector2

The size of the visual with respect to the size of its parent visual.

Remarks

The value is normalized with respect to the size of the visual's parent. For example, a value of (1.0, 0.5) indicates that the visual should be the full width of its parent but only half the height.

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).

Applies to

Product Versions
Windows App SDK 0.8, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6