Megosztás a következőn keresztül:


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.

Windows requirements

Device family
Windows 10 Creators Update (introduced in 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v4.0)

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 its Size to its RelativeSizeAdjustment combined with the effective size of the Parent Visual:

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

Applies to