LinearScale Class
Represents a scale for use in a LinearGauge.
public class LinearScale : ScaleBase, ILogicalParent, IVisualParent
- Inheritance:
- object Visual UIElement FrameworkElement GaugeElement ScaleBase object
- Implements:
- ILogicalParent IVisualParent
Remarks
For detailed documentation on this control's features and how to use them, please see the Gauge documentation topics.
Constructors
LinearScale()
Initializes a new instance of the LinearScale class.
public LinearScale()
Properties
BarAscent
Gets or sets the ascent of the bar. This is a dependency property.
public Unit BarAscent { get; set; }
Property Value
- Unit:
The ascent of the bar. The default value is
5
pixels.
LogicalChildren
Gets an enumerator for logical child elements of this element.
Orientation
Gets the orientation of this element, which is inherited/set via an attached property on LinearGauge.
TickSets
Gets the tick-set elements within the scale.
public LinearTickSetCollection TickSets { get; }
Property Value
- LinearTickSetCollection:
The tick-sets.
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.
GetBarAscent(DependencyObject)
Gets the value of the BarAscentProperty attached property for a specified object.
[AttachedPropertyBrowsableForChildren(IncludeDescendants = true)]
public static Unit GetBarAscent(DependencyObject obj)
Parameter | Type | Description |
---|---|---|
obj | DependencyObject | The object to which the attached property is retrieved. |
Returns
- Unit:
The bar ascent.
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 value 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.
OnRender(DrawingContext)
When overridden in a derived class, participates in rendering operations that are directed by the layout system. The rendering instructions for this element are not used directly when this method is invoked, and are instead preserved for later asynchronous use by layout and drawing.
protected override void OnRender(DrawingContext drawingContext)
Parameter | Type | Description |
---|---|---|
drawingContext | DrawingContext | The drawing instructions for a specific element. This context is provided to the layout system. |
SetBarAscent(DependencyObject, Unit)
Sets the value of the BarAscentProperty attached property to a specified object.
public static void SetBarAscent(DependencyObject obj, Unit value)
Parameter | Type | Description |
---|---|---|
obj | DependencyObject | The object to which the attached property is written. |
value | Unit | The bar ascent. |
Fields
BarAscentProperty
Identifies the BarAscent dependency property. This field is read-only.
public static readonly DependencyProperty BarAscentProperty
Inherited Members
- ScaleBase.BackgroundProperty
- ScaleBase.BarExtentProperty
- ScaleBase.BorderBrushProperty
- ScaleBase.BorderDashStyleProperty
- ScaleBase.BorderWidthProperty
- ScaleBase.IsBarVisibleProperty
- ScaleBase.GetBarExtent(DependencyObject)
- ScaleBase.OnCreateAutomationPeer()
- ScaleBase.SetBarExtent(DependencyObject, Unit)
- ScaleBase.Background
- ScaleBase.BarExtent
- ScaleBase.BorderBrush
- ScaleBase.BorderDashStyle
- ScaleBase.BorderWidth
- ScaleBase.IsBarVisible
- GaugeElement.ZIndexProperty
- GaugeElement.GetVisualChild(int)
- GaugeElement.GetZIndex(UIElement)
- GaugeElement.SetZIndex(UIElement, int)
- GaugeElement.VisualChildren
- GaugeElement.VisualChildrenCount
- GaugeElement.ZIndex