Class RadRadialGauge
Represents a radial gauge control designed to display a value within a definite range using a circular visualization. The control provides customizable appearance, range settings, and angular positioning for gauge elements.
Inherited Members
Namespace: Telerik.WinControls.UI.Gauges
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadRadialGauge : RadControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider
Constructors
RadRadialGauge()
Initializes a new instance of the RadRadialGauge class with default settings. The foreground color is set to black by default.
Declaration
public RadRadialGauge()
Properties
CenterOffsetX
Gets or sets the horizontal offset from the center of the gauge. This property controls the gauge's position in the horizontal direction relative to its center point.
Declaration
public double CenterOffsetX { get; set; }
Property Value
|
System.Double
|
CenterOffsetY
Gets or sets the vertical offset from the center of the gauge. This property controls the gauge's position in the vertical direction relative to its center point.
Declaration
public double CenterOffsetY { get; set; }
Property Value
|
System.Double
|
DefaultSize
Gets the default size of the radial gauge control.
Declaration
protected override Size DefaultSize { get; }
Property Value
|
System.Drawing.Size
|
ForeColor
Gets or sets the foreground color of the control. This property affects the color of the gauge elements and text within the root element.
Declaration
public override Color ForeColor { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
GaugeElement
Gets or sets the RadRadialGaugeElement that represents the main gauge element providing the core functionality and visual representation of the radial gauge.
Declaration
public RadRadialGaugeElement GaugeElement { get; set; }
Property Value
|
RadRadialGaugeElement
|
Items
Gets the collection of gauge items that have been added to the gauge. This collection contains all visual elements such as scales, needles, and indicators.
Declaration
[RadEditItemsAction]
public virtual RadItemOwnerCollection Items { get; }
Property Value
|
RadItemOwnerCollection
|
RangeEnd
Gets or sets the maximum value of the gauge's range. This defines the upper bound of values that can be displayed on the gauge.
Declaration
public double RangeEnd { get; set; }
Property Value
|
System.Double
|
RangeStart
Gets or sets the minimum value of the gauge's range. This defines the lower bound of values that can be displayed on the gauge.
Declaration
public double RangeStart { get; set; }
Property Value
|
System.Double
|
StartAngle
Gets or sets the starting angle of the gauge arc in degrees. This angle defines where the gauge's arc begins, measured clockwise from the top (12 o'clock position).
Declaration
public double StartAngle { get; set; }
Property Value
|
System.Double
|
SweepAngle
Gets or sets the angular span of the gauge arc in degrees. This determines the total angle covered by the gauge, starting from StartAngle in a clockwise direction.
Declaration
public double SweepAngle { get; set; }
Property Value
|
System.Double
|
Value
Gets or sets the current value displayed by the gauge. This value should be within the range defined by RangeStart and RangeEnd.
Declaration
public float Value { get; set; }
Property Value
|
System.Single
|
XmlSerializationInfo
Gets or sets the serialization configuration used by Save/Load layout methods to persist gauge settings to/from XML. When set to null, the configuration provided by GetDefaultXmlSerializationInfo() will be used.
Declaration
public ComponentXmlSerializationInfo XmlSerializationInfo { get; set; }
Property Value
|
ComponentXmlSerializationInfo
|
Methods
CreateChildItems(RadElement)
Creates the child elements for the radial gauge control, specifically the main gauge element.
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
|
RadElement
parent
The parent element to which the gauge element will be added. |
Overrides
CreateGaugeElement()
Creates and returns a new instance of the gauge element for this control. This method can be overridden to provide custom gauge element implementations.
Declaration
protected virtual RadRadialGaugeElement CreateGaugeElement()
Returns
|
RadRadialGaugeElement
A new instance of RadRadialGaugeElement. |
GetDefaultXmlSerializationInfo()
Gets the default XML serialization configuration for the RadRadialGauge control. This method defines which properties should be included or excluded during serialization.
Declaration
public virtual ComponentXmlSerializationInfo GetDefaultXmlSerializationInfo()
Returns
|
ComponentXmlSerializationInfo
A ComponentXmlSerializationInfo object containing the default serialization metadata. |
LoadLayout(String)
Loads gauge layout and properties from the specified XML file using the current XmlSerializationInfo. Displays an error message if the file is not found.
Declaration
public virtual void LoadLayout(string fileName)
Parameters
|
System.String
fileName
The path to the XML file containing the layout data. |
LoadLayout(String, DesignTimeInstanceFactory)
Loads gauge layout and properties from the specified XML file using a design-time instance factory. This overload is typically used during design-time operations. Displays an error message if the file is not found.
Declaration
public virtual void LoadLayout(string fileName, DesignTimeInstanceFactory factory)
Parameters
|
System.String
fileName
The path to the XML file containing the layout data. |
|
DesignTimeInstanceFactory
factory
The design-time instance factory to use for creating objects during deserialization. |
LoadLayout(XmlReader)
Loads gauge layout and properties from the specified XML reader using the current XmlSerializationInfo.
Declaration
public virtual void LoadLayout(XmlReader xmlReader)
Parameters
|
System.Xml.XmlReader
xmlReader
The XML reader containing the layout data to load. |
LoadLayout(XmlReader, InstanceFactory)
Loads gauge layout and properties from the specified XML reader using a custom instance factory for creating objects during deserialization.
Declaration
public virtual void LoadLayout(XmlReader xmlReader, InstanceFactory factory)
Parameters
|
System.Xml.XmlReader
xmlReader
The XML reader containing the layout data to load. |
|
InstanceFactory
factory
The instance factory to use for creating objects during deserialization. |
ResetFields()
Resets all gauge properties to their default values. This includes start angle, sweep angle, value, and range settings.
Declaration
protected virtual void ResetFields()
SaveLayout(Stream)
Saves the gauge layout and properties to the specified stream in XML format using the current XmlSerializationInfo. The stream remains open after the operation completes.
Declaration
public virtual void SaveLayout(Stream stream)
Parameters
|
System.IO.Stream
stream
The stream to write the XML layout data to. |
SaveLayout(String)
Saves the gauge layout and properties to the specified file in XML format using the current XmlSerializationInfo.
Declaration
public virtual void SaveLayout(string fileName)
Parameters
|
System.String
fileName
The path to the file where the layout should be saved. |
SaveLayout(XmlWriter)
Saves the gauge layout and properties to the specified XML writer using the current XmlSerializationInfo.
Declaration
public virtual void SaveLayout(XmlWriter xmlWriter)
Parameters
|
System.Xml.XmlWriter
xmlWriter
The XML writer to use for serialization. |
Events
ValueChanged
Occurs when the gauge's Value property is modified. This event is fired whenever the displayed value changes.
Declaration
public event EventHandler ValueChanged
Event Type
|
System.EventHandler
|