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
public enum AdornerStretch
public enum class AdornerStretch
type 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. |
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.
' The slider extends the full width of the control it adorns.
AdornerPanel.SetAdornerHorizontalAlignment( _
opacitySlider, _
AdornerHorizontalAlignment.Stretch)
' Position the adorner above the control it adorns.
AdornerPanel.SetAdornerVerticalAlignment( _
opacitySlider, _
AdornerVerticalAlignment.OutsideTop)
' Position the adorner 5 pixels above the control.
AdornerPanel.SetAdornerMargin( _
opacitySlider, _
New Thickness(0, 0, 0, 5))
// The slider extends the full width of the control it adorns.
AdornerPanel.SetAdornerHorizontalAlignment(
opacitySlider,
AdornerHorizontalAlignment.Stretch);
// Position the adorner above the control it adorns.
AdornerPanel.SetAdornerVerticalAlignment(
opacitySlider,
AdornerVerticalAlignment.OutsideTop);
// Position the adorner 5 pixels above the control.
AdornerPanel.SetAdornerMargin(
opacitySlider,
new Thickness(0, 0, 0, 5));
See Also
Reference
Microsoft.Windows.Design.Interaction Namespace