AxisPanel
A panel providing a Bitmap and Labels Canvas for use on Axis within Ultrachart
Inherits: Panel
Implements: IAxisPanel, INotifyPropertyChanged
Properties
public Action<AxisCanvas> AddLabels { get; set; }
value = axisPanel.AddLabels
axisPanel.AddLabels = value
Used internally. Specifies a method which is used to fill the panel with tick labels.
public AxisAlignment AxisAlignment { get; set; }
value = axisPanel.AxisAlignment
axisPanel.AxisAlignment = value
Gets or sets the axis alignment.
public bool DrawLabels { get; set; }
value = axisPanel.DrawLabels
axisPanel.DrawLabels = value
Gets or sets a value indicating whether this panel draws labels
public bool DrawMajorTicks { get; set; }
value = axisPanel.DrawMajorTicks
axisPanel.DrawMajorTicks = value
Gets or sets a value indicating whether this panel draws Major ticks
public bool DrawMinorTicks { get; set; }
value = axisPanel.DrawMinorTicks
axisPanel.DrawMinorTicks = value
Gets or sets a value indicating whether this panel draws Minor ticks
public bool IsHorizontalAxis { get; }
value = axisPanel.IsHorizontalAxis
Gets a value indicating whether this pabel is horizontal axis.
public bool IsLabelCullingEnabled { get; set; }
value = axisPanel.IsLabelCullingEnabled
axisPanel.IsLabelCullingEnabled = value
Gets or sets a value indicating whether Label Culling is enabled (when labels overlap) on this AxisPanel instance
public Thickness LabelToTickIndent { get; }
value = axisPanel.LabelToTickIndent
Gets the label to tick indent.
public Style MajorTickLineStyle { get; set; }
value = axisPanel.MajorTickLineStyle
axisPanel.MajorTickLineStyle = value
Gets or sets the major tick line style.
public double MajorTickSize { get; private set; }
value = axisPanel.MajorTickSize
axisPanel.MajorTickSize = value
Gets the size of a major tick.
public Style MinorTickLineStyle { get; set; }
value = axisPanel.MinorTickLineStyle
axisPanel.MinorTickLineStyle = value
Gets or sets the minor tick line style.
public double MinorTickSize { get; private set; }
value = axisPanel.MinorTickSize
axisPanel.MinorTickSize = value
Gets the size of a minor tick.
Methods
public void AddTickLabels(Action<AxisCanvas> addOnCanvas)
axisPanel.AddTickLabels(addOnCanvas)
Draws the tick labels.
protected override Size ArrangeOverride(Size finalSize)
result = axisPanel.ArrangeOverride(finalSize)
Performs the arrange pass on AxisPanel.
private void DrawTick(IRenderContext2D renderContext, IPen2D tickPen, float coord, float offset, double tickSize)
axisPanel.DrawTick(renderContext, tickPen, coord, offset, tickSize)
Draws a single tick on the axis, using the specified pen (TargetType IPen2D), XyDirection and integer coordinate.
- renderContext
- The canvas to draw on.
- tickPen
- The pen (TargetType IPen2D) to apply to the tick line
- coord
- The integer coordinate to draw at. If direction is XDirection, the coodinate is an X-coordinate, else it is a Y-coordinate
- offset
- tickSize
- The size of the tick
protected virtual void DrawTicks(IRenderContext2D renderContext, Style tickStyle, double tickSize, float[] tickCoords, float offset)
axisPanel.DrawTicks(renderContext, tickStyle, tickSize, tickCoords, offset)
Draws ticks on axis bitmap
- renderContext
- tickStyle
- tickSize
- tickCoords
- offset
public virtual void DrawTicks(TickCoordinates tickCoords, float offset)
axisPanel.DrawTicks(tickCoords, offset)
Draws ticks on axis
- tickCoords
- offset
protected virtual Size GetRenderContextSize()
result = axisPanel.GetRenderContextSize()
Gets size of image for ticks drawing
protected override Size MeasureOverride(Size availableSize)
result = axisPanel.MeasureOverride(availableSize)
Performs the measure pass on AxisPanel.
private double MeasureTickSize(Style lineStyle)
result = axisPanel.MeasureTickSize(lineStyle)
Measures the size required to draw tick marks on the axis
protected virtual void OnPropertyChanged(string propertyName)
axisPanel.OnPropertyChanged(propertyName)
INotifyPropertyChanged implementation
- propertyName
- Name of the property.
Events
public event PropertyChangedEventHandler PropertyChanged
axisPanel.PropertyChanged += handler
Occurs when a property value changes.
Fields
public static readonly DependencyProperty AxisAlignmentProperty
value = AxisPanel.AxisAlignmentProperty
The axis alignment property
public static readonly DependencyProperty AxisLabelToTickIndentProperty
value = AxisPanel.AxisLabelToTickIndentProperty
The AxisLabelToTickIndent property
public static readonly DependencyProperty DrawLabelsProperty
value = AxisPanel.DrawLabelsProperty
The draw labels property
public static readonly DependencyProperty DrawMajorTicksProperty
value = AxisPanel.DrawMajorTicksProperty
The draw major ticks property
public static readonly DependencyProperty DrawMinorTicksProperty
value = AxisPanel.DrawMinorTicksProperty
The draw minor ticks property
public static readonly DependencyProperty IsLabelCullingEnabledProperty
value = AxisPanel.IsLabelCullingEnabledProperty
The IsLabelCullingEnabled DependencyProperty
public static readonly DependencyProperty MajorTickLineStyleProperty
value = AxisPanel.MajorTickLineStyleProperty
The major tick line style property
public static readonly DependencyProperty MinorTickLineStyleProperty
value = AxisPanel.MinorTickLineStyleProperty
The minor tick line style property