Class LinearScale
Represents linear scale. To render this scale, create an instance of the LinearScale class, and set required properties.
Inheritance
Implements
Namespace: Syncfusion.UI.Xaml.Gauges
Assembly: Syncfusion.SfGauge.WPF.dll
Syntax
public class LinearScale : Control, IDisposable
Constructors
LinearScale()
Initializes a new instance of the LinearScale class.
Declaration
public LinearScale()
Fields
BindRangeStrokeToLabelsProperty
Using a DependencyProperty as the backing store for BindRangeStrokeToLabels. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty BindRangeStrokeToLabelsProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
BindRangeStrokeToTicksProperty
Using a DependencyProperty as the backing store for BindRangeStrokeToTicks. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty BindRangeStrokeToTicksProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ElementsPositionModeProperty
Using a DependencyProperty as the backing store for ElementsPosition. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ElementsPositionModeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IntervalProperty
Using a DependencyProperty as the backing store for Interval. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty IntervalProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LabelFormatProperty
Using a DependencyProperty as the backing store for LabelFormat. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty LabelFormatProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LabelOffsetProperty
Using a DependencyProperty as the backing store for LabelOffset. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty LabelOffsetProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LabelPositionFactorProperty
Using a DependencyProperty as the backing store for LabelPositionFactor. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty LabelPositionFactorProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LabelPositionProperty
Using a DependencyProperty as the backing store for LabelPosition. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty LabelPositionProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LabelPostfixProperty
Declaration
public static readonly DependencyProperty LabelPostfixProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LabelPrefixProperty
Declaration
public static readonly DependencyProperty LabelPrefixProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LabelSizeProperty
Using a DependencyProperty as the backing store for LabelSize. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty LabelSizeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LabelStrokeProperty
Using a DependencyProperty as the backing store for LabelStroke. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty LabelStrokeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LabelTemplateProperty
Using a DependencyProperty as the backing store for LabelTemplate. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty LabelTemplateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LabelVisibilityProperty
Using a DependencyProperty as the backing store for LabelVisibility. This enables the lables to get Visible or Collapsed etc...
Declaration
public static readonly DependencyProperty LabelVisibilityProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
MajorTickSizeProperty
Using a DependencyProperty as the backing store for MajorTickSize. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MajorTickSizeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
MajorTickStrokeProperty
Using a DependencyProperty as the backing store for MajorTickStroke. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MajorTickStrokeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
MajorTickStrokeThicknessProperty
Using a DependencyProperty as the backing store for MajorTickStrokeThickness. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MajorTickStrokeThicknessProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
MaximumProperty
Using a DependencyProperty as the backing store for Maximum. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MaximumProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
MinimumProperty
Using a DependencyProperty as the backing store for Minimum. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MinimumProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
MinorTickSizeProperty
Using a DependencyProperty as the backing store for MinorTickSize. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MinorTickSizeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
MinorTicksPerIntervalProperty
Using a DependencyProperty as the backing store for MinorTicksPerInterval. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MinorTicksPerIntervalProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
MinorTickStrokeProperty
Declaration
public static readonly DependencyProperty MinorTickStrokeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
MinorTickStrokeThicknessProperty
Using a DependencyProperty as the backing store for MinorTickStrokeThickness. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MinorTickStrokeThicknessProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
PointersProperty
Using a DependencyProperty as the backing store for Pointers. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty PointersProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
RangePositionProperty
Using a DependencyProperty as the backing store for RangePosition. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty RangePositionProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
RangesProperty
Using a DependencyProperty as the backing store for Ranges. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty RangesProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ScaleBarBorderBrushProperty
Using a DependencyProperty as the backing store for ScaleBarBorderBrush. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ScaleBarBorderBrushProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ScaleBarBorderThicknessProperty
Using a DependencyProperty as the backing store for ScaleBarBorderThickness. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ScaleBarBorderThicknessProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ScaleBarLengthProperty
Using a DependencyProperty as the backing store for ScaleBarLength. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ScaleBarLengthProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ScaleBarPositionFactorProperty
Using a DependencyProperty as the backing store for ScaleBarPositionFactor. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ScaleBarPositionFactorProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ScaleBarSizeProperty
Using a DependencyProperty as the backing store for ScaleBarSize. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ScaleBarSizeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ScaleBarStrokeProperty
Using a DependencyProperty as the backing store for ScaleBarStroke. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ScaleBarStrokeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ScaleDirectionProperty
Using a DependencyProperty as the backing store for ScaleDirection. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ScaleDirectionProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
TickPositionFactorProperty
Using a DependencyProperty as the backing store for TickPositionFactor. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty TickPositionFactorProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
TickPositionProperty
Using a DependencyProperty as the backing store for TickPosition. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty TickPositionProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Properties
BindRangeStrokeToLabels
Gets or sets a value indicating whether the color of labels should be similar to the color of ranges.
Declaration
public bool BindRangeStrokeToLabels { get; set; }
Property Value
Type |
---|
System.Boolean |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.Ranges.Add(new LinearRange() { StartValue = 0, EndValue = 30 });
linearGauge.MainScale.BindRangeStrokeToLabels = true;
this.Layout.Children.Add(linearGauge);
}
}
}
BindRangeStrokeToTicks
Gets or sets a value indicating whether the color of ticks should be similar to the color of ranges.
Declaration
public bool BindRangeStrokeToTicks { get; set; }
Property Value
Type |
---|
System.Boolean |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.Ranges.Add(new LinearRange() { StartValue = 0, EndValue = 30 });
linearGauge.MainScale.BindRangeStrokeToTicks = true;
this.Layout.Children.Add(linearGauge);
}
}
}
ElementsPositionMode
Gets or sets the position of elements with respect to the linear scale.
Declaration
public LinearScalePositionModes ElementsPositionMode { get; set; }
Property Value
Type |
---|
LinearScalePositionModes |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.ElementPosition = LinearScalePositionModes.Custom;
this.Layout.Children.Add(linearGauge);
}
}
}
Interval
Gets or sets the interval for major ticks in the linear scale.
Declaration
public double Interval { get; set; }
Property Value
Type |
---|
System.Double |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.Interval = 20;
this.Layout.Children.Add(linearGauge);
}
}
}
LabelFormat
Gets or sets the format for labels in the linear scale.
Declaration
public string LabelFormat { get; set; }
Property Value
Type |
---|
System.String |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.LabelFormat = "$ #";
this.Layout.Children.Add(linearGauge);
}
}
}
LabelOffset
Gets or sets the offset value to show space between ticks and labels.
Declaration
public double LabelOffset { get; set; }
Property Value
Type |
---|
System.Double |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.LabelOffset = 5;
this.Layout.Children.Add(linearGauge);
}
}
}
LabelPosition
Gets or sets the position of labels with respect to the linear scale.
Declaration
public LinearLabelsPosition LabelPosition { get; set; }
Property Value
Type |
---|
LinearLabelsPosition |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.LabelPosition = LinearLabelsPosition.Above;
this.Layout.Children.Add(linearGauge);
}
}
}
LabelPositionFactor
Gets or sets the factor value to position labels based upon the scale.
Declaration
public double LabelPositionFactor { get; set; }
Property Value
Type |
---|
System.Double |
Remarks
It shows effect only if ElementsPosition of linear scale is set as Custom.
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.LabelPositionFactor = 0.5;
this.Layout.Children.Add(linearGauge);
}
}
}
LabelPostfix
Gets or sets the LabelPostfix value that can attached at the end of the labels.
Declaration
public string LabelPostfix { get; set; }
Property Value
Type | Description |
---|---|
System.String | string |
Remarks
Used to add some extentions to the labels like % symbol can be added to labels while displaying the percentage values in SfLinearGauge.
Examples
using Syncfusion.UI.Xaml.Gauges;
using Windows.UI;
using Windows.UI.Xaml.Media;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.LabelStroke = new
SolidColorBrush(Colors.Blue);
linearGauge.MainScale.LabelPostfix="%";
this.Layout.Children.Add(linearGauge);
}
}
}
LabelPrefix
Gets or sets the LabelPrefix value that can be added before the labels.
Declaration
public string LabelPrefix { get; set; }
Property Value
Type | Description |
---|---|
System.String | string |
Remarks
Used to add some prefix to the labels like $ symbol can be added to labels while displaying the dollar values in SfLinearGauge.
Examples
using Syncfusion.UI.Xaml.Gauges;
using Windows.UI;
using Windows.UI.Xaml.Media;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.LabelStroke = new
SolidColorBrush(Colors.Blue);
linearGauge.MainScale.LabelPrefix="$";
this.Layout.Children.Add(linearGauge);
}
}
}
LabelSize
Gets or sets the font size of the labels in the linear scale.
Declaration
public double LabelSize { get; set; }
Property Value
Type |
---|
System.Double |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.LabelSize = 12;
this.Layout.Children.Add(linearGauge);
}
}
}
LabelStroke
Gets or sets the color of the labels in the linear scale.
Declaration
public Brush LabelStroke { get; set; }
Property Value
Type |
---|
System.Windows.Media.Brush |
Examples
using Syncfusion.UI.Xaml.Gauges;
using Windows.UI;
using Windows.UI.Xaml.Media;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.LabelStroke = new
SolidColorBrush(Colors.Blue);
this.Layout.Children.Add(linearGauge);
}
}
}
LabelTemplate
Gets or sets the template for labels in the linear scale.
Declaration
public DataTemplate LabelTemplate { get; set; }
Property Value
Type |
---|
System.Windows.DataTemplate |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.LabelTemplate = this.Resources["DefaultLabelTemplate"] as DataTemplate;
this.Layout.Children.Add(linearGauge);
}
}
}
LabelVisibility
Gets or sets the visibility of the labels in the linear scale.
Declaration
public Visibility LabelVisibility { get; set; }
Property Value
Type |
---|
System.Windows.Visibility |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.LabelSize = 12;
linearGauge.MainScale.LabelVisibility=Visibility.Visible;
this.Layout.Children.Add(linearGauge);
}
}
}
MajorTickSize
Gets or sets the length of major ticks in the linear scale.
Declaration
public double MajorTickSize { get; set; }
Property Value
Type |
---|
System.Double |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.MajorTickSize = 10;
this.Layout.Children.Add(linearGauge);
}
}
}
MajorTickStroke
Gets or sets the color of the major ticks in the linear scale.
Declaration
public Brush MajorTickStroke { get; set; }
Property Value
Type |
---|
System.Windows.Media.Brush |
Examples
using Syncfusion.UI.Xaml.Gauges;
using Windows.UI;
using Windows.UI.Xaml.Media;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.MajorTickStroke = new SolidColorBrush(Colors.Green);
this.Layout.Children.Add(linearGauge);
}
}
}
MajorTickStrokeThickness
Gets or sets the thickness of the major ticks in the linear scale.
Declaration
public double MajorTickStrokeThickness { get; set; }
Property Value
Type |
---|
System.Double |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.MajorTickStrokeThickness = 4;
this.Layout.Children.Add(linearGauge);
}
}
}
Maximum
Gets or sets the maximum value of the linear scale
Declaration
public double Maximum { get; set; }
Property Value
Type |
---|
System.Double |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.Maximum = 90;
this.Layout.Children.Add(linearGauge);
}
}
}
Minimum
Gets or sets the minimum value of the linear scale
Declaration
public double Minimum { get; set; }
Property Value
Type |
---|
System.Double |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.Minimum = 10;
this.Layout.Children.Add(linearGauge);
}
}
}
MinorTickSize
Gets or sets the length of minor ticks in the linear scale.
Declaration
public double MinorTickSize { get; set; }
Property Value
Type |
---|
System.Double |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.MinorTickSize = 10;
this.Layout.Children.Add(linearGauge);
}
}
}
MinorTicksPerInterval
Gets or sets the number of minor ticks that has to be placed in-between the major ticks in the linear scale.
Declaration
public int MinorTicksPerInterval { get; set; }
Property Value
Type |
---|
System.Int32 |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.MinorTicksPerInterval = 3;
this.Layout.Children.Add(linearGauge);
}
}
}
MinorTickStroke
Gets or sets the color of the minor ticks in the linear scale.
Declaration
public Brush MinorTickStroke { get; set; }
Property Value
Type |
---|
System.Windows.Media.Brush |
Examples
using Syncfusion.UI.Xaml.Gauges;
using Windows.UI;
using Windows.UI.Xaml.Media;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.MinorTickStroke = new SolidColorBrush(Colors.Orange);
this.Layout.Children.Add(linearGauge);
}
}
}
MinorTickStrokeThickness
Gets or sets the thickness of the minor ticks in the linear scale.
Declaration
public double MinorTickStrokeThickness { get; set; }
Property Value
Type |
---|
System.Double |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.MinorTickStrokeThickness = 4;
this.Layout.Children.Add(linearGauge);
}
}
}
Pointers
Gets or sets the collection of linear pointers.
Declaration
public LinearPointerCollection Pointers { get; set; }
Property Value
Type |
---|
LinearPointerCollection |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.Pointers.Add(new LinearPointer() { Value = 30 });
this.Layout.Children.Add(linearGauge);
}
}
}
RangePosition
Gets or sets the position of ranges with respect to the linear scale.
Declaration
public LinearRangesPosition RangePosition { get; set; }
Property Value
Type |
---|
LinearRangesPosition |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.RangePosition = LinearRangesPosition.Below;
this.Layout.Children.Add(linearGauge);
}
}
}
Ranges
Gets or sets the collection of linear ranges.
Declaration
public LinearRangeCollection Ranges { get; set; }
Property Value
Type |
---|
LinearRangeCollection |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.Ranges.Add(new LinearRange() { StartValue = 0, EndValue = 30 });
this.Layout.Children.Add(linearGauge);
}
}
}
ScaleBarBorderBrush
Gets or sets the border color of the linear scale bar.
Declaration
public Brush ScaleBarBorderBrush { get; set; }
Property Value
Type |
---|
System.Windows.Media.Brush |
Examples
using Syncfusion.UI.Xaml.Gauges;
using Windows.UI;
using Windows.UI.Xaml.Media;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.ScaleBarBorderBrush = new
SolidColorBrush(Colors.Red);
this.Layout.Children.Add(linearGauge);
}
}
}
ScaleBarBorderThickness
Gets or sets the border thickness of the linear scale bar.
Declaration
public Thickness ScaleBarBorderThickness { get; set; }
Property Value
Type |
---|
System.Windows.Thickness |
Examples
using Syncfusion.UI.Xaml.Gauges;
using Windows.UI.Xaml;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.ScaleBarBorderThickness = new Thickness(2);
this.Layout.Children.Add(linearGauge);
}
}
}
ScaleBarLength
Gets or sets the length of the linear scale bar.
Declaration
public double ScaleBarLength { get; set; }
Property Value
Type |
---|
System.Double |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.ScaleBarLength = 450;
this.Layout.Children.Add(linearGauge);
}
}
}
ScaleBarPositionFactor
Gets or sets the factor value to position ScaleBars based upon the scale.
Declaration
public double ScaleBarPositionFactor { get; set; }
Property Value
Type |
---|
System.Double |
Remarks
It shows effect only if ElementsPosition of linear scale is set as Custom.
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.ScaleBarSize = 10;
this.Layout.Children.Add(linearGauge);
}
}
}
ScaleBarSize
Gets or sets the size of the linear scale bar.
Declaration
public double ScaleBarSize { get; set; }
Property Value
Type |
---|
System.Double |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.ScaleBarSize = 50;
this.Layout.Children.Add(linearGauge);
}
}
}
ScaleBarStroke
Gets or sets the color of the linear scale bar.
Declaration
public Brush ScaleBarStroke { get; set; }
Property Value
Type |
---|
System.Windows.Media.Brush |
Examples
using Syncfusion.UI.Xaml.Gauges;
using Windows.UI;
using Windows.UI.Xaml.Media;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.ScaleBarStroke = new
SolidColorBrush(Colors.Gray);
this.Layout.Children.Add(linearGauge);
}
}
}
ScaleDirection
Gets or sets the direction of the linear scale.
Declaration
public LinearScaleDirection ScaleDirection { get; set; }
Property Value
Type |
---|
LinearScaleDirection |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.ScaleDirection =
LinearScaleDirection.Backward;
this.Layout.Children.Add(linearGauge);
}
}
}
TickPosition
Gets or sets the position of ticks with respect to the linear scale.
Declaration
public LinearTicksPosition TickPosition { get; set; }
Property Value
Type |
---|
LinearTicksPosition |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.TickPosition = LinearTicksPosition.Above;
this.Layout.Children.Add(linearGauge);
}
}
}
TickPositionFactor
Gets or sets the factor value to position ticks based upon the scale.
Declaration
public double TickPositionFactor { get; set; }
Property Value
Type |
---|
System.Double |
Remarks
It shows effect only if ElementsPosition of linear scale is set as Custom.
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.TickSize = 10;
this.Layout.Children.Add(linearGauge);
}
}
}
Methods
Dispose()
Method to release allocated resources of LinearScale.
Declaration
public void Dispose()
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call System.Windows.FrameworkElement.ApplyTemplate.
Declaration
public override void OnApplyTemplate()