GaugeBase Class
Represents the base class for all Gauge controls.
public abstract class GaugeBase : GaugeElement, ILogicalParent, IVisualParent
- Inheritance:
- object Visual UIElement FrameworkElement GaugeElement object
- Derived:
- CircularGaugeBase RectangularGaugeBase
- Implements:
- ILogicalParent IVisualParent
Constructors
GaugeBase()
Initializes an instance of the class.
protected GaugeBase()
Properties
Background
The background brush.
IsBackgroundEffectEnabled
Indicates whether a special effect should be rendered for the background of the gauge.
public bool IsBackgroundEffectEnabled { get; set; }
Property Value
- bool:
trueif the background effect is enabled; otherwise,false. The default value istrue.
IsRimEffectEnabled
Indicates whether a special effect should be rendered for the rim portion of the gauge.
public bool IsRimEffectEnabled { get; set; }
Property Value
- bool:
trueif the rim effect is enabled; otherwise,false. The default value istrue.
Items
The UIElement objects within the gauge.
public LogicalChildrenCollection<UIElement> Items { get; }
Property Value
LogicalChildren
Gets an enumerator for logical child elements of this element.
protected override IEnumerator? LogicalChildren { get; }
Property Value
- IEnumerator:
An enumerator for logical child elements of this element.
Origin
The origin of the X and Y coordinates, which is only used when the gauge is embedded inside another gauge. The default value is Center.
RimBrush
The rim brush.
UnitBaseX
The base value used to convert Unit types to a double along the x-axis.
UnitBaseY
The base value used to convert Unit types to a double along the y-axis.
X
The X-coordinate of this gauge, which is only used when the gauge is embedded inside another gauge.
Y
The Y-coordinate of this gauge, which is only used when the gauge is embedded inside another gauge.
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.
GetLocation(UIElement, Size)
Returns the location of the given element assuming the specified size.
protected virtual Point GetLocation(UIElement element, Size size)
| Parameter | Type | Description |
|---|---|---|
| element | UIElement | The element. |
| size | Size | The size. |
Returns
- Point
GetOrigin(DependencyObject)
Returns the value of the OriginProperty attached property for a specified object.
[AttachedPropertyBrowsableForChildren(IncludeDescendants = true)]
public static CoordinateOrigin GetOrigin(DependencyObject obj)
| Parameter | Type | Description |
|---|---|---|
| obj | DependencyObject | The object to which the attached property is retrieved. |
Returns
GetX(DependencyObject)
Gets the value of the XProperty attached property for a specified object.
[AttachedPropertyBrowsableForChildren(IncludeDescendants = true)]
public static Unit GetX(DependencyObject obj)
| Parameter | Type | Description |
|---|---|---|
| obj | DependencyObject | The object to which the attached property is retrieved. |
Returns
- Unit:
The X-coordinate value.
GetY(DependencyObject)
Gets the value of the YProperty attached property for a specified object.
[AttachedPropertyBrowsableForChildren(IncludeDescendants = true)]
public static Unit GetY(DependencyObject obj)
| Parameter | Type | Description |
|---|---|---|
| obj | DependencyObject | The object to which the attached property is retrieved. |
Returns
- Unit:
The Y-coordinate value.
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.
OnCreateAutomationPeer()
Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
protected override AutomationPeer? OnCreateAutomationPeer()
Returns
- AutomationPeer:
The type-specific AutomationPeer implementation.
OnRenderSizeChanged(SizeChangedInfo)
Raises the SizeChanged event, using the specified information as part of the eventual event data.
protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
| Parameter | Type | Description |
|---|---|---|
| sizeInfo | SizeChangedInfo | Details of the old and new size involved in the change. |
SetOrigin(DependencyObject, CoordinateOrigin)
Sets the value of the OriginProperty attached property to a specified object.
public static void SetOrigin(DependencyObject obj, CoordinateOrigin value)
| Parameter | Type | Description |
|---|---|---|
| obj | DependencyObject | The object to which the attached property is written. |
| value | CoordinateOrigin | The coordinate origin. |
SetX(DependencyObject, Unit)
Sets the value of the XProperty attached property to a specified object.
public static void SetX(DependencyObject obj, Unit value)
| Parameter | Type | Description |
|---|---|---|
| obj | DependencyObject | The object to which the attached property is written. |
| value | Unit | The X-coordinate value. |
SetY(DependencyObject, Unit)
Sets the value of the YProperty attached property to a specified object.
public static void SetY(DependencyObject obj, Unit value)
| Parameter | Type | Description |
|---|---|---|
| obj | DependencyObject | The object to which the attached property is written. |
| value | Unit | The Y-coordinate value. |
ToBitmap(double, double)
Creates a BitmapSource based on the contents of the gauge.
public BitmapSource? ToBitmap(double dpiX, double dpiY)
| Parameter | Type | Description |
|---|---|---|
| dpiX | double | The x DPI. |
| dpiY | double | The y DPI. |
Returns
UpdateUnitBases()
protected virtual void UpdateUnitBases()
Fields
BackgroundProperty
Defines the Background property.
public static readonly DependencyProperty BackgroundProperty
IsBackgroundEffectEnabledProperty
Defines the IsBackgroundEffectEnabled property.
public static readonly DependencyProperty IsBackgroundEffectEnabledProperty
IsRimEffectEnabledProperty
Defines the IsRimEffectEnabled property.
public static readonly DependencyProperty IsRimEffectEnabledProperty
OriginProperty
Defines the Origin property.
public static readonly DependencyProperty OriginProperty
RimBrushProperty
Defines the RimBrush property.
public static readonly DependencyProperty RimBrushProperty
UnitBaseXProperty
Defines the read-only UnitBaseX property.
public static readonly DependencyProperty UnitBaseXProperty
UnitBaseYProperty
Defines the read-only UnitBaseY property.
public static readonly DependencyProperty UnitBaseYProperty
XProperty
Defines the X property.
public static readonly DependencyProperty XProperty
YProperty
Defines the Y property.
public static readonly DependencyProperty YProperty
Inherited Members
- GaugeElement.ZIndexProperty
- GaugeElement.GetVisualChild(int)
- GaugeElement.GetZIndex(UIElement)
- GaugeElement.SetZIndex(UIElement, int)
- GaugeElement.VisualChildren
- GaugeElement.VisualChildrenCount
- GaugeElement.ZIndex