New to Telerik UI for WinFormsStart a free 30-day trial

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:

C#
public class RadLinearGauge : RadControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider

Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadLinearGauge...

Derived Classes: RadBulletGraph

Implements: IAnalyticsProviderIBindableComponentIComponentIComponentTreeHandlerIDisposableIDropTargetILayoutHandlerINotifyPropertyChangedISupportInitializeISupportInitializeNotificationISynchronizeInvokeIWin32Window...

Inherited Members RadControl.isResizing2RadControl.isDisposing2RadControl.invalidResizeRectRadControl.isAccessibilityRequestedRadControl.Dispose(bool)RadControl.Construct()RadControl.CreateBehavior()RadControl.CreateRootElement()RadControl.InitializeRootElement(RootRadElement)RadControl.LoadElementTree()RadControl.LoadElementTree(Size)RadControl.SetBackColorThemeOverrides()RadControl.ResetBackColorThemeOverrides()RadControl.SetForeColorThemeOverrides()RadControl.ResetForeColorThemeOverrides()RadControl.OnKeyDown(KeyEventArgs)RadControl.OnKeyUp(KeyEventArgs)RadControl.OnPreviewKeyDown(PreviewKeyDownEventArgs)RadControl.OnKeyPress(KeyPressEventArgs)RadControl.OnClick(EventArgs)RadControl.OnDoubleClick(EventArgs)RadControl.OnMouseDown(MouseEventArgs)RadControl.OnMouseUp(MouseEventArgs)RadControl.OnMouseEnter(EventArgs)RadControl.OnMouseLeave(EventArgs)RadControl.OnMouseMove(MouseEventArgs)RadControl.OnMouseHover(EventArgs)RadControl.OnMouseWheel(MouseEventArgs)RadControl.OnMouseCaptureChanged(EventArgs)RadControl.OnGotFocus(EventArgs)RadControl.OnLostFocus(EventArgs)RadControl.OnCreateControl()RadControl.OnHandleDestroyed(EventArgs)RadControl.OnParentChanged(EventArgs)RadControl.OnVisibleChanged(EventArgs)RadControl.OnFontChanged(EventArgs)RadControl.OnForeColorChanged(EventArgs)RadControl.OnBackColorChanged(EventArgs)RadControl.OnEnabledChanged(EventArgs)RadControl.OnBindingContextChanged(EventArgs)RadControl.OnLocationChanged(EventArgs)RadControl.OnPaddingChanged(EventArgs)RadControl.OnRightToLeftChanged(EventArgs)RadControl.OnPaint(PaintEventArgs)RadControl.OnLayout(LayoutEventArgs)RadControl.OnAutoSizeChanged(EventArgs)RadControl.WndProc(ref Message)RadControl.OnInvalidated(RadElement)RadControl.OnLoad(Size)RadControl.OnCaptureLosing()RadControl.OnThemeChanged()RadControl.OnToolTipTextNeeded(object, ToolTipTextNeededEventArgs)RadControl.OnScreenTipNeeded(object, ScreenTipNeededEventArgs)RadControl.OnThemeNameChanged(ThemeNameChangedEventArgs)RadControl.ProcessMnemonic(char)RadControl.ProcessFocusRequested(RadElement)RadControl.ProcessCaptureChangeRequested(RadElement, bool)RadControl.ProcessAutoSizeChanged(bool)RadControl.IsInputKey(Keys)RadControl.GetInputElement()RadControl.BeginInit()RadControl.EndInit()RadControl.OnNotifyPropertyChanged(string)RadControl.OnNotifyPropertyChanged(PropertyChangedEventArgs)RadControl.GetPreferredSize(Size)RadControl.SetBoundsCore(int, int, int, int, BoundsSpecified)RadControl.OnZoomGesture(ZoomGestureEventArgs)RadControl.OnRotateGesture(RotateGestureEventArgs)RadControl.OnPanGesture(PanGestureEventArgs)RadControl.OnTwoFingerTapGesture(GestureEventArgs)RadControl.OnPressAndTapGesture(PressAndTapGestureEventArgs)RadControl.OnGesture(GestureEventArgs)RadControl.ProcessGesture(Message)RadControl.EnableGesture(GestureType)RadControl.DisableGesture(GestureType)RadControl.Refresh()RadControl.SuspendUpdate()RadControl.ResumeUpdate()RadControl.ResumeUpdate(bool)RadControl.InvokeLayoutCallback(LayoutCallback)RadControl.RegisterHostedControl(RadHostItem)RadControl.UnregisterHostedControl(RadHostItem, bool)RadControl.ResolveStyleGroupForElement(StyleGroup, RadObject)RadControl.GetPlainText()RadControl.ShouldSerializeProperty(RadProperty)RadControl.ShouldSerializeProperty(RadProperty, RadObject)RadControl.ResetProperty(RadProperty, RadObject)RadControl.CanEditElementAtDesignTime(RadElement)RadControl.ProcessCodedUIMessage(ref IPCMessage)RadControl.FindPropertyInChildren(RadControl, IPCMessage)RadControl.PerformRadAutoScale(BoundsSpecified?)RadControl.GetMonitorDpiScaleFactor(Control)RadControl.SetRadAutoScale(bool)RadControl.EnableDpiScalingRadControl.EnableRadAutoScaleRadControl.EnableRadFormInitialDpiScalingRadControl.EnableImageDpiScalingRadControl.EnableSvgImagesRadControl.IsLoadedRadControl.ElementTreeRadControl.UseCompatibleTextRenderingDefaultValueRadControl.BehaviorRadControl.RootElementRadControl.PaddingRadControl.ThemeNameRadControl.TextRadControl.EnableThemingRadControl.ThemeClassNameRadControl.ImageListRadControl.ImageScalingSizeRadControl.UseCompatibleTextRenderingRadControl.AutoSizeRadControl.MaximumSizeRadControl.MinimumSizeRadControl.FocusableRadControl.SiteRadControl.CausesValidationRadControl.IsInitializingRadControl.SmallImageListRadControl.SmallImageScalingSizeRadControl.IsDesignModeRadControl.IsDisplayedRadControl.FocusedElementRadControl.AllowShowFocusCuesRadControl.ShowItemToolTipsRadControl.CommandBindingsRadControl.EnableKeyMapRadControl.BackColorRadControl.FontRadControl.ValidationCancelRadControl.EnableAnalyticsRadControl.AnalyticsNameRadControl.EnableRadAccessibilityObjectsRadControl.EnableCodedUITestsRadControl.EnableCodedUITestsDefaultValueRadControl.EnableUIAutomationRadControl.EnableUIAutomationDefaultValueRadControl.ElementInvalidatedRadControl.ToolTipTextNeededRadControl.ScreenTipNeededRadControl.ThemeNameChangedRadControl.InitializedRadControl.PropertyChangedRadControl.ZoomGestureRadControl.RotateGestureRadControl.PanGestureRadControl.TwoFingerTapGestureRadControl.PressAndTapGesture...

Constructors

Initializes a new instance of the RadLinearGauge class.

C#
public RadLinearGauge()

Properties

Gets the default size of the control based on its orientation.

C#
protected override Size DefaultSize { get; }

Overrides: Control.DefaultSize

Gets or sets the foreground color of the control, which is applied to the root element.

C#
public override Color ForeColor { get; set; }

Overrides: RadControl.ForeColor

Gets the RadLinearGaugeElement that represents the main gauge element containing all visual components.

C#
[Browsable(false)]
public RadLinearGaugeElement GaugeElement { get; }

Gets the collection of gauge items (bars, ticks, labels, needles, etc.) that comprise the gauge's visual elements.

C#
[RadEditItemsAction]
public virtual RadItemOwnerCollection Items { get; }

Gets the type name of the RadLinearGauge for serialization purposes.

C#
protected virtual string RadLinearGaugeName { get; }

Gets or sets the maximum value of the gauge range.

C#
public float RangeEnd { get; set; }

Gets or sets the minimum value of the gauge range.

C#
public float RangeStart { get; set; }

Gets or sets the current value displayed on the gauge within the specified range.

C#
[Bindable(true)]
public float Value { get; set; }

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.

C#
[Browsable(false)]
public virtual ComponentXmlSerializationInfo XmlSerializationInfo { get; set; }

Methods

Creates the child elements for the control, specifically the main RadLinearGaugeElement.

C#
protected override void CreateChildItems(RadElement parent)
Parameters:parentRadElement

The parent element that will contain the child items.

Overrides: RadControl.CreateChildItems(RadElement)

Gets the default XML serialization information for the RadLinearGauge control.

C#
public virtual ComponentXmlSerializationInfo GetDefaultXmlSerializationInfo()
Returns:

ComponentXmlSerializationInfo

The default ComponentXmlSerializationInfo for this control.

Gets the desired size of the root element after applying DPI scaling factors.

C#
protected override Size GetRootElementDesiredSize(int x, int y, int width, int height)
Parameters:xint

The x-coordinate of the element.

yint

The y-coordinate of the element.

widthint

The width of the element.

heightint

The height of the element.

Returns:

Size

The desired size of the root element.

Overrides: RadControl.GetRootElementDesiredSize(int, int, int, int)

Loads RadLinearGauge properties, sub-objects and their properties from an XML file, using the serialization information provided by the XmlSerializationInfo property.

C#
public virtual void LoadLayout(string fileName, DesignTimeInstanceFactory factory)
Parameters:fileNamestring

The file name to load the XML layout from.

factoryDesignTimeInstanceFactory

The DesignTimeInstanceFactory to use for creating objects during deserialization.

Loads RadLinearGauge properties, sub-objects and their properties from an XML file, using the serialization information provided by the XmlSerializationInfo property.

C#
public virtual void LoadLayout(string fileName)
Parameters:fileNamestring

The file name to load the XML layout from.

Loads RadLinearGauge properties, sub-objects and their properties from an XML reader with the specified instance factory.

C#
public virtual void LoadLayout(XmlReader xmlReader, InstanceFactory factory)
Parameters:xmlReaderXmlReader

The XmlReader containing the layout data.

factoryInstanceFactory

The InstanceFactory to use for creating objects during deserialization.

Loads RadLinearGauge properties, sub-objects and their properties from an XML reader, using the serialization information provided by the XmlSerializationInfo property.

C#
public virtual void LoadLayout(XmlReader xmlReader)
Parameters:xmlReaderXmlReader

The XmlReader containing the layout data to load.

Resets the gauge properties to their default values.

C#
protected virtual void ResetFields()

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.

C#
public virtual void SaveLayout(Stream stream)
Parameters:streamStream

The stream to write the XML content to.

Stores RadLinearGauge properties, sub-objects and their properties to a file in XML format, using the serialization information provided by the XmlSerializationInfo property.

C#
public virtual void SaveLayout(string fileName)
Parameters:fileNamestring

The file name to save the XML layout to.

Stores RadLinearGauge properties, sub-objects and their properties in XML format, using the serialization information provided by the XmlSerializationInfo property.

C#
public virtual void SaveLayout(XmlWriter xmlWriter)
Parameters:xmlWriterXmlWriter

The XmlWriter to use for the built-in serializer.

Scales the control based on the specified scaling factors for DPI scaling support.

C#
protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
Parameters:factorSizeF

The scaling factor to apply to the control.

specifiedBoundsSpecified

The bounds to scale.

Overrides: RadControl.ScaleControl(SizeF, BoundsSpecified)

Events

Occurs when the orientation of the gauge is changed between horizontal and vertical.

C#
public event EventHandler OrientationChanged

Occurs when the gauge value is modified.

C#
public event EventHandler ValueChanged