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