Share via


Visual.RelativeSizeAdjustment Property

Definition

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

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

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

Property Value

Vector2 Vector2

float2

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