Represents the main radial gauge element that serves as a container for all other gauge components including needles, arcs, labels, and ticks. This element provides the core functionality for displaying values in a circular gauge format with customizable ranges, angles, and positioning.
Definition
Namespace:Telerik.WinControls.UI.Gauges
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadRadialGaugeElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementRadRadialGaugeElement...
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadRadialGaugeElement class with default settings including padding, item collection configuration, and supported gauge item types.
public RadRadialGaugeElement()
Fields
Identifies the Value dependency property used for storing the current gauge value.
public static RadProperty ValueProperty
Properties
Gets or sets the thickness of the gauge axis in pixels, which affects the spacing and visual appearance of gauge elements and their positioning relative to the gauge center.
protected double AxisThickness { get; set; }
Gets or sets the horizontal offset of the gauge center as a proportional value, allowing fine adjustment of the gauge positioning within its container for optimal visual balance.
public double CenterOffsetX { get; set; }
Gets or sets the vertical offset of the gauge center as a proportional value, allowing fine adjustment of the gauge positioning within its container for optimal visual balance.
public double CenterOffsetY { get; set; }
Gets the calculated end angle of the gauge arc by adding the SweepAngle to the StartAngle, representing the final position of the gauge arc in degrees.
public double EndAngle { get; }
Gets the center point of the gauge as a PointF, calculated from the GaugeSize and adjusted by the CenterOffsetX and CenterOffsetY properties for precise positioning.
public PointF GaugeCenter { get; }
Gets the bounding rectangle that defines the drawable area of the gauge, calculated based on the element size, padding, label positioning, and axis thickness to ensure proper gauge rendering.
public RectangleF GaugeSize { get; }
Gets the collection of gauge items including arcs, needles, labels, ticks, single labels, and backgrounds that comprise the complete gauge visualization. The collection supports design-time editing and serialization.
[RadEditItemsAction]
public virtual RadItemOwnerCollection Items { get; }
Gets or sets the offset distance of labels from the gauge circumference, affecting the positioning of label elements around the gauge perimeter.
protected double LabelOffset { get; set; }
Gets or sets a value indicating whether labels are positioned inside the gauge arc or outside the gauge circumference, affecting the overall layout and readability of the gauge.
protected bool LabelsPositionInside { get; set; }
Gets or sets the maximum value of the gauge range, which defines the upper boundary for valid gauge values. This value must be greater than RangeStart to maintain a valid range.
public double RangeEnd { get; set; }
Gets or sets the minimum value of the gauge range, which defines the lower boundary for valid gauge values. This value must be less than RangeEnd to maintain a valid range.
public double RangeStart { get; set; }
Gets or sets the starting angle of the gauge arc in degrees, measured clockwise from the positive X-axis. This angle defines where the gauge range begins and is used in conjunction with SweepAngle to determine the total arc.
public double StartAngle { get; set; }
Gets or sets the angular extent of the gauge arc in degrees, measured clockwise from the StartAngle. This property determines the total arc length available for displaying the gauge range.
public double SweepAngle { get; set; }
Gets or sets the current value displayed on the gauge, which must be within the range defined by RangeStart and RangeEnd properties. Changes to this property trigger the ValueChanged event.
[Bindable(true)]
public float Value { get; set; }
Methods
Calculates the needle angle in degrees based on the specified value within the given range, mapping the value proportionally to the angular range defined by the start and sweep angles.
public double CalculateNeedleAngle(double value, double rangeStart, double rangeEnd, double startAngle, double sweepAngle)
The value to convert to an angle position on the gauge.
rangeStartdoubleThe minimum value of the gauge range.
rangeEnddoubleThe maximum value of the gauge range.
startAngledoubleThe starting angle of the gauge arc in degrees.
sweepAngledoubleThe angular extent of the gauge arc in degrees.
Returns:The calculated needle angle in degrees, positioned proportionally within the gauge arc.
Notifies subscribers about property changes and invalidates the element to trigger a repaint. This method is called internally when gauge properties are modified.
protected override void OnNotifyPropertyChanged(string propertyName)
The name of the property that changed.
Overrides:
Called after a property value has changed to handle post-change processing. For the ValueProperty, ensures the value remains within range and triggers appropriate notifications.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Event arguments containing the changed property and its old and new values.
Overrides:
Called before a property value changes to validate the new value and potentially cancel the change. For the ValueProperty, ensures the new value falls within the valid range.
protected override void OnPropertyChanging(RadPropertyChangingEventArgs args)
Event arguments containing the property, old value, new value, and cancellation flag.
Overrides:
Raises the ValueChanged event and tracks analytics when the gauge value changes, providing notification to subscribers about value modifications.
protected void OnValueChanged()
Events
Occurs when the Value property changes, allowing subscribers to respond to gauge value modifications.
public event EventHandler ValueChanged