PixelSnapper Class
Represents a Decorator that measures its contents at integer intervals to help with pixel snapping.
public class PixelSnapper : Decorator
- Inheritance:
- object Visual UIElement FrameworkElement Decorator object
Constructors
PixelSnapper()
Initializes an instance of the class.
public PixelSnapper()
Properties
HorizontalRoundMode
A RoundMode indicating how to round the horizontal measurement of the child content. This is a dependency property.
public RoundMode HorizontalRoundMode { get; set; }
Property Value
Remarks
Set this property to None to not perform rounding.
VerticalRoundMode
A RoundMode indicating how to round the vertical measurement of the child content. This is a dependency property.
public RoundMode VerticalRoundMode { get; set; }
Property Value
Remarks
Set this property to None to not perform rounding.
Methods
MeasureOverride(Size)
Measures the child element of a Decorator to prepare for arranging it during the ArrangeOverride(Size) pass.
protected override Size MeasureOverride(Size constraint)
| Parameter | Type | Description |
|---|---|---|
| constraint | Size | An upper limit System.Windows.Size that should not be exceeded. |
Returns
- Size:
The target System.Windows.Size of the element.
Fields
HorizontalRoundModeProperty
Defines the HorizontalRoundMode property.
public static readonly DependencyProperty HorizontalRoundModeProperty
VerticalRoundModeProperty
Defines the VerticalRoundMode property.
public static readonly DependencyProperty VerticalRoundModeProperty