GridPattern
This panel is used to draw regular grid patterns.
Inherits: Panel
Constructors
Properties
public Size CellSize { get; set; }
value = gridPattern.CellSize
gridPattern.CellSize = value
Gets or sets the size of each grid cell.
public Point Origin { get; set; }
value = gridPattern.Origin
gridPattern.Origin = value
Gets or sets the snapping grid's coordinates starting point.
Methods
protected override Size ArrangeOverride(Size finalSize)
result = gridPattern.ArrangeOverride(finalSize)
Arrange all of the child elements.
- finalSize
public static int GetBarThickness(DependencyObject d)
result = GridPattern.GetBarThickness(d)
Gets the thickness of horizontal or vertical bars, in multiples of the cell size.
- d
- a Path
Returns: This defaults to 1, a single cell width or height, depending on the DependencyObject).
public static double GetCrossLength(DependencyObject d)
result = GridPattern.GetCrossLength(d)
Gets the length of a HorizontalCross or VerticalCross line.
- d
- a Path
Returns: This defaults to 6.
public static GridFigure GetFigure(DependencyObject d)
result = GridPattern.GetFigure(d)
Gets the GridFigure of the Path that describes its appearance.
- d
- a Path
Returns: This defaults to None
public static int GetInterval(DependencyObject d)
result = GridPattern.GetInterval(d)
Gets how far apart the lines (or the starts of the bar edges) should be drawn, in multiples of the cell size.
- d
- a Path
Returns: This defaults to 1, a single cell width or height, depending on the value of DependencyObject).
public static int GetOffset(DependencyObject d)
result = GridPattern.GetOffset(d)
Gets the offset for starting the count at which Paths should be drawn, in multiples of the cell size.
- d
- a Path
Returns: This defaults to zero.
protected override HitTestResult HitTestCore(PointHitTestParameters hitTestParameters)
result = gridPattern.HitTestCore(hitTestParameters)
This override is necessary to avoid a performance bug in WPF.
- hitTestParameters
protected override GeometryHitTestResult HitTestCore(GeometryHitTestParameters hitTestParameters)
result = gridPattern.HitTestCore(hitTestParameters)
This override is necessary to avoid a performance bug in WPF.
- hitTestParameters
protected override Size MeasureOverride(Size availableSize)
result = gridPattern.MeasureOverride(availableSize)
Supply the geometries for child Path elements that have a DependencyObject) that is not None, and measure all children.
- availableSize
public static void SetBarThickness(DependencyObject d, int v)
GridPattern.SetBarThickness(d, v)
Sets the thickness of bars, in multiples of the cell size.
- d
- a Path
- v
- a positive integer, in units of the cell width or height, depending on the direction given by DependencyObject)
public static void SetCrossLength(DependencyObject d, double v)
GridPattern.SetCrossLength(d, v)
Sets the length of a HorizontalCross or VerticalCross line.
- d
- a Path
- v
- a positive number, in model coordinates; the actual length of the line is limited by the CellSize.
public static void SetFigure(DependencyObject d, GridFigure v)
GridPattern.SetFigure(d, v)
Sets the GridFigure of the Path to determine its appearance.
- d
- a Path
- v
- a GridFigure; the panel assumes None otherwise
public static void SetInterval(DependencyObject d, int v)
GridPattern.SetInterval(d, v)
Sets how far apart the lines (or the starts of the bar edges) should be drawn.
- d
- a Path
- v
- a positive integer, in units of the cell width or height, depending on the direction given by DependencyObject)
public static void SetOffset(DependencyObject d, int v)
GridPattern.SetOffset(d, v)
Sets the starting offset at which the given Path is drawn, in multiples of the cell size.
- d
- a Path
- v
- a positive integer, in units of the cell width or height, depending on the direction given by DependencyObject)
Fields
public static readonly DependencyProperty BarThicknessProperty
value = GridPattern.BarThicknessProperty
Identifies the BarThickness attached dependency property.
public static readonly DependencyProperty CellSizeProperty
value = GridPattern.CellSizeProperty
Identifies the CellSize dependency property.
public static readonly DependencyProperty CrossLengthProperty
value = GridPattern.CrossLengthProperty
Identifies the CrossLength attached dependency property.
public static readonly DependencyProperty FigureProperty
value = GridPattern.FigureProperty
Identifies the Figure attached dependency property.
public static readonly DependencyProperty IntervalProperty
value = GridPattern.IntervalProperty
Identifies the Interval attached dependency property.
public static readonly DependencyProperty OffsetProperty
value = GridPattern.OffsetProperty
Identifies the Offset attached dependency property.
public static readonly DependencyProperty OriginProperty
value = GridPattern.OriginProperty
Identifies the Origin dependency property.