Udostępnij za pośrednictwem


AdornerStretch Enumeration

An enumeration used to identify how the particular dimension (X or Y) of an adorner behaves when Design view is scaled.

Namespace:  Microsoft.Windows.Design.Interaction
Assembly:  Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)

Syntax

'Declaration
Public Enumeration AdornerStretch
'Usage
Dim instance As AdornerStretch
public enum AdornerStretch
public enum class AdornerStretch
public enum AdornerStretch

Members

Member name Description
None The dimension remains the same during scaling. Therefore, the adorner does not change size or scale during scaling.
Stretch The dimension stretches during scaling. Therefore, the adorner gets larger, but the stroke of rendered elements/lines/pens does not increase.
Scale The dimension scales during scaling. Therefore, the adorner gets larger, and the stroke of rendered elements/lines/pens increases.

Remarks

Use AdornerStretch in the SetHorizontalStretch and SetVerticalStretch methods to specify the scaling behavior of an adorner panel when Design view is scaled.

Examples

The following code example shows how to use the SetHorizontalStretch method to specify the horizontal AdornerStretch value for an adorner. This code example is part of a larger example for the AdornerPanel class.

AdornerPanel.SetHorizontalStretch(opacitySlider, AdornerStretch.Stretch)
AdornerPanel.SetVerticalStretch(opacitySlider, AdornerStretch.None)
AdornerPanel.SetHorizontalStretch(opacitySlider, AdornerStretch.Stretch);
AdornerPanel.SetVerticalStretch(opacitySlider, AdornerStretch.None);

See Also

Reference

Microsoft.Windows.Design.Interaction Namespace

AdornerPanel

Other Resources

Walkthrough: Creating a Design-time Adorner

Adorner Architecture