CircularGaugeBase Class
Represents a circular gauge control.
public abstract class CircularGaugeBase : GaugeBase, ILogicalParent, IVisualParent
- Inheritance:
- object Visual UIElement FrameworkElement GaugeElement GaugeBase object
- Derived:
- CircularGauge FlipSwitch Led
- Implements:
- ILogicalParent IVisualParent
Constructors
CircularGaugeBase()
Initializes an instance of the class.
protected CircularGaugeBase()
Properties
BackgroundGeometry
The custom geometry used for the frame background.
public Geometry? BackgroundGeometry { get; set; }
Property Value
Remarks
This property is only used when BackgroundType is set to CustomBackgroundGeometry.
BackgroundImageSource
The source of a custom image used for the frame background.
public ImageSource? BackgroundImageSource { get; set; }
Property Value
Remarks
This property is only used when BackgroundType is set to CustomBackgroundImage.
BackgroundRadiusRatio
The radius of the frame background as a ratio of the Radius property.
public double BackgroundRadiusRatio { get; set; }
Property Value
- double:
The default value is
0.7846.
BackgroundType
The type of frame background to be rendered.
public CircularBackgroundType BackgroundType { get; set; }
Property Value
- CircularBackgroundType:
The default value is CircularOrb.
FrameType
The type of frame rendered.
public CircularFrameType FrameType { get; set; }
Property Value
- CircularFrameType:
The default value is CircularOrb.
GlassType
The type of glass effect rendered, if any.
public CircularGlassType GlassType { get; set; }
Property Value
- CircularGlassType:
The default value is None.
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.
Radius
The radius of the gauge.
RimGeometry
The custom geometry used for the frame rim.
public Geometry? RimGeometry { get; set; }
Property Value
Remarks
This property is only used when RimType is set to CustomRimGeometry.
RimImageSource
The source of a custom image used for the frame rim.
public ImageSource? RimImageSource { get; set; }
Property Value
Remarks
This property is only used when RimType is set to CustomRimImage.
RimType
The type of frame rim to be rendered.
public CircularRimType RimType { get; set; }
Property Value
- CircularRimType:
The default value is CircularThinRim.
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.
GetRadius(DependencyObject)
Gets the value of the RadiusProperty attached property for a specified object.
[AttachedPropertyBrowsableForChildren(IncludeDescendants = true)]
public static Unit GetRadius(DependencyObject obj)
| Parameter | Type | Description |
|---|---|---|
| obj | DependencyObject | The object to which the attached property is retrieved. |
Returns
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. |
RenderFrameBackground(DrawingContext)
Renders the background of the frame based on the actual width and height, and the FrameType and Radius properties.
protected virtual void RenderFrameBackground(DrawingContext drawingContext)
| Parameter | Type | Description |
|---|---|---|
| drawingContext | DrawingContext | The drawing context. |
RenderFrameRim(DrawingContext)
Renders the rim of the frame based on the actual width and height, and the FrameType and Radius properties.
protected virtual void RenderFrameRim(DrawingContext drawingContext)
| Parameter | Type | Description |
|---|---|---|
| drawingContext | DrawingContext | The drawing context. |
SetRadius(DependencyObject, Unit)
Sets the value of the RadiusProperty attached property to a specified object.
public static void SetRadius(DependencyObject obj, Unit value)
| Parameter | Type | Description |
|---|---|---|
| obj | DependencyObject | The object to which the attached property is written. |
| value | Unit | The radius. |
UpdateUnitBases()
protected override void UpdateUnitBases()
Fields
BackgroundGeometryProperty
Defines the BackgroundGeometry property.
public static readonly DependencyProperty BackgroundGeometryProperty
BackgroundImageSourceProperty
Defines the BackgroundImageSource property.
public static readonly DependencyProperty BackgroundImageSourceProperty
BackgroundRadiusRatioProperty
Defines the BackgroundRadiusRatio property.
public static readonly DependencyProperty BackgroundRadiusRatioProperty
BackgroundTypeProperty
Defines the BackgroundType property.
public static readonly DependencyProperty BackgroundTypeProperty
FrameTypeProperty
Defines the FrameType property.
public static readonly DependencyProperty FrameTypeProperty
GlassTypeProperty
Defines the GlassType property.
public static readonly DependencyProperty GlassTypeProperty
RadiusProperty
Defines the Radius property.
public static readonly DependencyProperty RadiusProperty
RimGeometryProperty
Defines the RimGeometry property.
public static readonly DependencyProperty RimGeometryProperty
RimImageSourceProperty
Defines the RimImageSource property.
public static readonly DependencyProperty RimImageSourceProperty
RimTypeProperty
Defines the RimType property.
public static readonly DependencyProperty RimTypeProperty
Inherited Members
- GaugeBase.BackgroundProperty
- GaugeBase.IsBackgroundEffectEnabledProperty
- GaugeBase.IsRimEffectEnabledProperty
- GaugeBase.OriginProperty
- GaugeBase.RimBrushProperty
- GaugeBase.UnitBaseXProperty
- GaugeBase.UnitBaseYProperty
- GaugeBase.XProperty
- GaugeBase.YProperty
- GaugeBase.GetLocation(UIElement, Size)
- GaugeBase.OnCreateAutomationPeer()
- GaugeBase.OnRenderSizeChanged(SizeChangedInfo)
- GaugeBase.GetOrigin(DependencyObject)
- GaugeBase.SetOrigin(DependencyObject, CoordinateOrigin)
- GaugeBase.ToBitmap(double, double)
- GaugeBase.GetX(DependencyObject)
- GaugeBase.SetX(DependencyObject, Unit)
- GaugeBase.GetY(DependencyObject)
- GaugeBase.SetY(DependencyObject, Unit)
- GaugeBase.Background
- GaugeBase.IsBackgroundEffectEnabled
- GaugeBase.IsRimEffectEnabled
- GaugeBase.Items
- GaugeBase.Origin
- GaugeBase.RimBrush
- GaugeBase.UnitBaseX
- GaugeBase.UnitBaseY
- GaugeBase.X
- GaugeBase.Y
- GaugeElement.ZIndexProperty
- GaugeElement.GetVisualChild(int)
- GaugeElement.GetZIndex(UIElement)
- GaugeElement.SetZIndex(UIElement, int)
- GaugeElement.VisualChildren
- GaugeElement.VisualChildrenCount
- GaugeElement.ZIndex