menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class LinearRange - API Reference

    Show / Hide Table of Contents

    Class LinearRange

    Represents the range visual element, which spans a range of consecutive values represented by a visual.

    Inheritance
    System.Object
    GaugeElement
    RangeBase
    LinearRange
    Inherited Members
    RangeBase.DistanceFromScaleProperty
    RangeBase.EndValueProperty
    RangeBase.EndWidthProperty
    RangeBase.RangePositionProperty
    RangeBase.StartValueProperty
    RangeBase.StartWidthProperty
    RangeBase.BindIndicatorProperty
    RangeBase.IndicatorColorProperty
    RangeBase.CoerceEndValue(Object)
    RangeBase.CoerceEndValue(DependencyObject, Object)
    RangeBase.CoerceStartValue(DependencyObject, Object)
    RangeBase.CoerceStartValue(Object)
    RangeBase.OnDistanceFromScaleChanged(DependencyPropertyChangedEventArgs)
    RangeBase.OnEndValueChanged(DependencyPropertyChangedEventArgs)
    RangeBase.OnEndWidthChanged(DependencyPropertyChangedEventArgs)
    RangeBase.OnRangePositionChanged(DependencyPropertyChangedEventArgs)
    RangeBase.OnStartValueChanged(DependencyPropertyChangedEventArgs)
    RangeBase.OnIndicatorColorChanged(DependencyPropertyChangedEventArgs)
    RangeBase.OnStartWidthChanged(DependencyPropertyChangedEventArgs)
    RangeBase.DistanceFromScale
    RangeBase.EndValue
    RangeBase.EndWidth
    RangeBase.RangePosition
    RangeBase.StartValue
    RangeBase.StartWidth
    RangeBase.BindIndicator
    RangeBase.IndicatorColor
    RangeBase.DistanceFromScaleChanged
    RangeBase.EndValueChanged
    RangeBase.EndWidthChanged
    RangeBase.RangePositionChanged
    RangeBase.StartValueChanged
    RangeBase.StartWidthChanged
    RangeBase.BindIndicatorChanged
    RangeBase.IndicatorColorChanged
    GaugeElement.BackgroundBrushProperty
    GaugeElement.BorderBrushProperty
    GaugeElement.BorderWidthProperty
    GaugeElement.BackgroundBrush
    GaugeElement.BorderBrush
    GaugeElement.BorderWidth
    Namespace: Syncfusion.Windows.Gauge
    Assembly: Syncfusion.Gauge.WPF.dll
    Syntax
    public class LinearRange : RangeBase
    Remarks

    The Range's EndValue should be specified before StartValue because of the constraint that the StartValue should not be greater than EndValue

    Examples
    
    
    
    
    
    
    
    
    
    
    
    
    
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Windows;
    using System.Windows.Media;
    using System.Windows.Controls;
    using System.Windows.Data;
    using Syncfusion.Windows.Shared;
    using Syncfusion.Windows.Gauge;

    namespace LinearRangeSample { public partial class Window1 : Window { private LinearGauge linearGauge1;

    public Window1() { InitializeComponent();

    linearGauge1 = new LinearGauge(); this.linearGauge1.CenterFrameFillColor = Colors.Brown;

    LinearScale scale = new LinearScale(); scale.Minimum = 0; scale.Maximum = 100; scale.MinorIntervalValue = 2; scale.MajorIntervalValue = 10; scale.ScaleBarSize = 20; scale.ScaleBarLength = 260; linearGauge1.Scales.Add(scale);

    LinearRange range = new LinearRange(); range.StartValue = 70; range.EndValue = 100; range.StartWidth = 0; range.EndWidth = 10; range.RangePosition = ScalePlacement.Inside; range.DistanceFromScale = 2; range.BackgroundBrush = new SolidColorBrush(Colors.OrangeRed); scale.Ranges.Add(range);

    this.Content = linearGauge1; } } }

    Constructors

    LinearRange()

    Initializes a new instance of the LinearRange class.

    Declaration
    public LinearRange()

    Methods

    ArrangeOverride(Size)

    Positions child elements and determines a size for the element.

    Declaration
    protected override Size ArrangeOverride(Size finalSize)
    Parameters
    Type Name Description
    System.Windows.Size finalSize

    The final area within the parent that this element should use to arrange itself and its children.

    Returns
    Type Description
    System.Windows.Size

    The actual size used.

    MeasureOverride(Size)

    Measures the size in layout required for child elements and determines a size for the element.

    Declaration
    protected override Size MeasureOverride(Size availableSize)
    Parameters
    Type Name Description
    System.Windows.Size availableSize

    The available size that this element can give to child elements.

    Returns
    Type Description
    System.Windows.Size

    The size that this element determines it needs during layout.

    OnBindIndicatorChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises StartValueChanged /> event.

    Declaration
    protected override void OnBindIndicatorChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    Overrides
    RangeBase.OnBindIndicatorChanged(DependencyPropertyChangedEventArgs)

    OnInitialized(EventArgs)

    Raises the System.Windows.FrameworkElement.Initialized event. This method is invoked whenever System.Windows.FrameworkElement.IsInitialized property is set to true internally.

    Declaration
    protected override void OnInitialized(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    The System.EventArgs that contains the event data.

    OnRender(DrawingContext)

    Participates in rendering operations that are directed by the layout system.

    Declaration
    protected override void OnRender(DrawingContext drawingContext)
    Parameters
    Type Name Description
    System.Windows.Media.DrawingContext drawingContext

    The drawing instructions for a specific element.

    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved