XAxisVisual Class
Draws an axis given axis data.
public class XAxisVisual : AxisVisual
- Inheritance:
- object Visual UIElement FrameworkElement Control AxisVisual object
Methods
ArrangeOverride(Size)
When overridden in a derived class, positions child elements and determines a size for a FrameworkElement derived class.
protected override Size ArrangeOverride(Size finalSize)
Parameter | Type | Description |
---|---|---|
finalSize | Size | The final area within the parent that this element should use to arrange itself and its children. |
Returns
- Size:
The actual size used.
DrawMajorTickAtPosition(double, Size)
Draws a major tick at a given position on the axis.
protected override void DrawMajorTickAtPosition(double position, Size plotSize)
Parameter | Type | Description |
---|---|---|
position | double | The position to draw the tick at. |
plotSize | Size | Size of the plot. |
DrawMinorTickAtPosition(double, Size)
Draws a minor tick at a given position on the axis.
protected override void DrawMinorTickAtPosition(double position, Size plotSize)
Parameter | Type | Description |
---|---|---|
position | double | The position to draw the tick at. |
plotSize | Size | Size of the plot. |
DrawSpine(Size)
Draws an axis spine.
protected override void DrawSpine(Size plotSize)
Parameter | Type | Description |
---|---|---|
plotSize | Size |
GetTitleTemplateFromResources(ResourceDictionary)
Retrieves the appropriate DataTemplate for the axis title from the given ResourceDictionary.
protected override DataTemplate GetTitleTemplateFromResources(ResourceDictionary resources)
Parameter | Type | Description |
---|---|---|
resources | ResourceDictionary | The ResourceDictionary to retrieve the title template from. |
Returns
- DataTemplate:
The template for the axis title.
MeasureOverride(Size)
When overridden in a derived class, measures the size in layout required for child elements and determines a size for the FrameworkElement-derived class.
protected override Size MeasureOverride(Size availableSize)
Parameter | Type | Description |
---|---|---|
availableSize | Size | The available size that this element can give to child elements. Infinity can be specified as a argumentValue to indicate that the element will size to whatever content is available. |
Returns
- Size:
The size that this element determines it needs during layout, based on its calculations of child element sizes.
PlaceLabelAtPosition(TextBlock, double, double, Size)
Place the axis label at the given position.
protected override void PlaceLabelAtPosition(TextBlock label, double position, double angle, Size plotSize)
Parameter | Type | Description |
---|---|---|
label | TextBlock | The axis label to lay out. |
position | double | The position to draw the axis label at. |
angle | double | The angle to draw the axis label at. |
plotSize | Size | Size of the plot. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | label |
UpdateTitlePosition(Size)
Updates the title position.
protected override void UpdateTitlePosition(Size plotSize)
Parameter | Type | Description |
---|---|---|
plotSize | Size |
Inherited Members
- AxisVisual.Infinity
- AxisVisual.AreAnyTicksVisible(Size)
- AxisVisual.GetTextBlockMeasuredSize(TextBlock)
- AxisVisual.DrawLineOnGeometry(PathGeometry, double, double, double, double)
- AxisVisual.GetRealNumberOrDefault(double, double)
- AxisVisual.IsSpineVisible()
- AxisVisual.OnApplyTemplate()
- AxisVisual.Refresh(Size)
- AxisVisual.TickMajorMidPixel
- AxisVisual.TickMinorMidPixel