CustomArcScaleRangeBarPresentation Class
Gets or sets the current presentation that specifies the appearance of the range bar.
Namespace: DevExpress.Xpf.Gauges
Assembly: DevExpress.Xpf.Gauges.v19.1.dll
Declaration
Remarks
Use the RangeBarTemplate property to specify a template that configures the range bar appearance.
Example
This example demonstrates how to customize an arc scale range bar’s appearance.
Initialize the ArcScaleRangeBar.Presentation property with a new
DevExpress.Xpf.Gauges.CustomArcScaleRangeBarPresentation
object.Use a ControlTemplate object to specify the CustomArcScaleRangeBarPresentation.RangeBarTemplate property.
<dxga:CircularGaugeControl Name="circularGaugeControl"
Margin="10">
<dxga:CircularGaugeControl.Scales>
<dxga:ArcScale StartValue="0" EndValue="12"
StartAngle="-90" EndAngle="270"
MajorIntervalCount="12" MinorIntervalCount="5">
<dxga:ArcScale.RangeBars>
<dxga:ArcScaleRangeBar AnchorValue="7" Value="3">
<!-- Customize an arc scale range bar's appearance. -->
<dxga:ArcScaleRangeBar.Presentation>
<dxga:CustomArcScaleRangeBarPresentation>
<dxga:CustomArcScaleRangeBarPresentation.RangeBarTemplate>
<ControlTemplate>
<Rectangle RenderTransformOrigin="0.5,0.5"
Opacity="0.8">
<Rectangle.Fill>
<LinearGradientBrush StartPoint="1,0" EndPoint="0,1">
<GradientStop Color="White" Offset="0.0"/>
<GradientStop Color="Red" Offset="0.5"/>
<GradientStop Color="Black" Offset="1"/>
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
</ControlTemplate>
</dxga:CustomArcScaleRangeBarPresentation.RangeBarTemplate>
</dxga:CustomArcScaleRangeBarPresentation>
</dxga:ArcScaleRangeBar.Presentation>
<!--...-->
</dxga:ArcScaleRangeBar>
</dxga:ArcScale.RangeBars>
<dxga:ArcScale.LabelOptions>
<dxga:ArcScaleLabelOptions ShowFirst="False"
Orientation="LeftToRight"/>
</dxga:ArcScale.LabelOptions>
<dxga:ArcScale.Needles>
<dxga:ArcScaleNeedle Value="3">
<dxga:ArcScaleNeedle.Options>
<dxga:ArcScaleNeedleOptions EndOffset="83"/>
</dxga:ArcScaleNeedle.Options>
</dxga:ArcScaleNeedle>
<dxga:ArcScaleNeedle Value="12"/>
</dxga:ArcScale.Needles>
<dxga:ArcScale.Layers>
<dxga:ArcScaleLayer/>
</dxga:ArcScale.Layers>
</dxga:ArcScale>
</dxga:CircularGaugeControl.Scales>
</dxga:CircularGaugeControl>
Inheritance
Extension Methods
See Also