All docs
V20.2
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

CustomLinearScaleRangeBarPresentation Class

Contains presentation settings that specify the range bar appearance.

Namespace: DevExpress.Xpf.Gauges

Assembly: DevExpress.Xpf.Gauges.v20.2.dll

Declaration

public class CustomLinearScaleRangeBarPresentation :
    LinearScaleRangeBarPresentation
Public Class CustomLinearScaleRangeBarPresentation
    Inherits LinearScaleRangeBarPresentation

Examples

This example demonstrates how to define a custom linear scale range and range bar presentation.

<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:GaugesDemoApp"
        xmlns:dxga="http://schemas.devexpress.com/winfx/2008/xaml/gauges" 
        x:Class="GaugesDemoApp.MainWindow"
        Title="MainWindow" Height="200" Width="300">
    <Grid>
        <dxga:LinearGaugeControl>
            <dxga:LinearGaugeControl.Scales>
                <dxga:LinearScale LayoutMode="LeftToRight" ShowMinorTickmarks="False" >
                    <dxga:LinearScale.Ranges>
                        <dxga:LinearScaleRange StartValue="0" EndValue="100">
                            <dxga:LinearScaleRange.Options>
                                <dxga:RangeOptions Thickness="40" Offset="20"/>
                            </dxga:LinearScaleRange.Options>
                            <dxga:LinearScaleRange.Presentation>
                                <dxga:CustomLinearScaleRangePresentation>
                                    <dxga:CustomLinearScaleRangePresentation.RangeTemplate>
                                        <ControlTemplate>
                                            <Viewbox RenderTransformOrigin="0.5, 1" Width="40" Stretch="Fill">
                                                <Rectangle Fill="LightGray" Width="10" Height="40" Clip="M9,40Q5,2,0,0L10,0 10,40"/>
                                            </Viewbox>
                                        </ControlTemplate>
                                    </dxga:CustomLinearScaleRangePresentation.RangeTemplate>
                                </dxga:CustomLinearScaleRangePresentation>
                            </dxga:LinearScaleRange.Presentation>
                        </dxga:LinearScaleRange>
                    </dxga:LinearScale.Ranges>
                    <dxga:LinearScale.RangeBars>
                        <dxga:LinearScaleRangeBar Value="80" IsInteractive="True">
                            <dxga:LinearScaleRangeBar.Options>
                                <dxga:LinearScaleRangeBarOptions Thickness="40" Offset="20"/>
                            </dxga:LinearScaleRangeBar.Options>
                            <dxga:LinearScaleRangeBar.Presentation>
                                <dxga:CustomLinearScaleRangeBarPresentation>
                                    <dxga:CustomLinearScaleRangeBarPresentation.RangeBarTemplate>
                                        <ControlTemplate>
                                            <Viewbox RenderTransformOrigin="0.5, 1" Width="40" Stretch="Fill">
                                                <Rectangle Fill="Lime" Width="10" Height="40" Clip="M9,40Q5,2,0,0L10,0 10,40"/>
                                            </Viewbox>
                                        </ControlTemplate>
                                    </dxga:CustomLinearScaleRangeBarPresentation.RangeBarTemplate>
                                </dxga:CustomLinearScaleRangeBarPresentation>
                            </dxga:LinearScaleRangeBar.Presentation>
                        </dxga:LinearScaleRangeBar>
                    </dxga:LinearScale.RangeBars>
                </dxga:LinearScale>
            </dxga:LinearGaugeControl.Scales>
        </dxga:LinearGaugeControl>
    </Grid>
</Window>

The image below illustrates the result.

Inheritance

Object
DispatcherObject
DependencyObject
Freezable
GaugeDependencyObject
PresentationBase
ValueIndicatorPresentation
DevExpress.Xpf.Gauges.LinearScaleRangeBarPresentation
CustomLinearScaleRangeBarPresentation
See Also