ClassRadLinearGauge
Represents a linear gauge control for displaying a value within a defined range using various visual indicators such as bars, ticks, labels, and needles.
Definition
Namespace:Telerik.WinControls.UI.Gauges
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadLinearGauge : RadControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadLinearGauge
Derived Classes:
Implements:
Inherited Members
Constructors
RadLinearGauge()
Initializes a new instance of the RadLinearGauge class.
Declaration
public RadLinearGauge()
Properties
DefaultSize
Gets the default size of the control based on its orientation.
Declaration
protected override Size DefaultSize { get; }
Property Value
Overrides
ForeColor
Gets or sets the foreground color of the control, which is applied to the root element.
Declaration
public override Color ForeColor { get; set; }
Property Value
Overrides
GaugeElement
Gets the RadLinearGaugeElement that represents the main gauge element containing all visual components.
Declaration
[Browsable(false)]
public RadLinearGaugeElement GaugeElement { get; }
Property Value
Items
Gets the collection of gauge items (bars, ticks, labels, needles, etc.) that comprise the gauge's visual elements.
Declaration
[RadEditItemsAction]
public virtual RadItemOwnerCollection Items { get; }
Property Value
RadLinearGaugeName
Gets the type name of the RadLinearGauge for serialization purposes.
Declaration
protected virtual string RadLinearGaugeName { get; }
Property Value
RangeEnd
Gets or sets the maximum value of the gauge range.
RangeStart
Gets or sets the minimum value of the gauge range.
Value
Gets or sets the current value displayed on the gauge within the specified range.
Declaration
[Bindable(true)]
public float Value { get; set; }
Property Value
XmlSerializationInfo
Gets or sets the serialization information for the RadLinearGauge used by Save/Load layout methods to persist gauge settings to/from XML. By default, or when set to null, the ComponentXmlSerializationInfo provided by GetDefaultXmlSerializationInfo() will be used.
Declaration
[Browsable(false)]
public virtual ComponentXmlSerializationInfo XmlSerializationInfo { get; set; }
Property Value
Methods
CreateChildItems(RadElement)
Creates the child elements for the control, specifically the main RadLinearGaugeElement.
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
parent
The parent element that will contain the child items.
Overrides
GetDefaultXmlSerializationInfo()
Gets the default XML serialization information for the RadLinearGauge control.
Declaration
public virtual ComponentXmlSerializationInfo GetDefaultXmlSerializationInfo()
Returns
The default ComponentXmlSerializationInfo for this control.
GetRootElementDesiredSize(int, int, int, int)
Gets the desired size of the root element after applying DPI scaling factors.
Declaration
protected override Size GetRootElementDesiredSize(int x, int y, int width, int height)
Parameters
x
The x-coordinate of the element.
y
The y-coordinate of the element.
width
The width of the element.
height
The height of the element.
Returns
The desired size of the root element.
Overrides
LoadLayout(XmlReader)
Loads RadLinearGauge properties, sub-objects and their properties from an XML reader, using the serialization information provided by the XmlSerializationInfo property.
LoadLayout(XmlReader, InstanceFactory)
Loads RadLinearGauge properties, sub-objects and their properties from an XML reader with the specified instance factory.
Declaration
public virtual void LoadLayout(XmlReader xmlReader, InstanceFactory factory)
Parameters
xmlReader
The XmlReader containing the layout data.
factory
The InstanceFactory to use for creating objects during deserialization.
LoadLayout(string)
Loads RadLinearGauge properties, sub-objects and their properties from an XML file, using the serialization information provided by the XmlSerializationInfo property.
Declaration
public virtual void LoadLayout(string fileName)
Parameters
fileName
The file name to load the XML layout from.
LoadLayout(string, DesignTimeInstanceFactory)
Loads RadLinearGauge properties, sub-objects and their properties from an XML file, using the serialization information provided by the XmlSerializationInfo property.
Declaration
public virtual void LoadLayout(string fileName, DesignTimeInstanceFactory factory)
Parameters
fileName
The file name to load the XML layout from.
factory
The DesignTimeInstanceFactory to use for creating objects during deserialization.
ResetFields()
Resets the gauge properties to their default values.
Declaration
protected virtual void ResetFields()
SaveLayout(Stream)
Stores RadLinearGauge properties, sub-objects and their properties to a stream in XML format, using the serialization information provided by the XmlSerializationInfo property. The XML content is written to the stream and the stream is left open.
Declaration
public virtual void SaveLayout(Stream stream)
Parameters
stream
The stream to write the XML content to.
SaveLayout(XmlWriter)
Stores RadLinearGauge properties, sub-objects and their properties in XML format, using the serialization information provided by the XmlSerializationInfo property.
SaveLayout(string)
Stores RadLinearGauge properties, sub-objects and their properties to a file in XML format, using the serialization information provided by the XmlSerializationInfo property.
Declaration
public virtual void SaveLayout(string fileName)
Parameters
fileName
The file name to save the XML layout to.
ScaleControl(SizeF, BoundsSpecified)
Scales the control based on the specified scaling factors for DPI scaling support.
Declaration
protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
Parameters
factor
The scaling factor to apply to the control.
specified
The bounds to scale.
Overrides
Events
OrientationChanged
Occurs when the orientation of the gauge is changed between horizontal and vertical.
ValueChanged
Occurs when the gauge value is modified.