Table of Contents
  • Getting Started
  • EO.Pdf
  • EO.Web
  • EO.WebBrowser
  • EO.Wpf
    • Overview
    • Installation & Deployement
    • Skin & Theme
    • Common Taskes and Services
    • EO.Wpf Buttons
    • EO.Wpf Calendar & DatePicker
    • EO.Wpf ComboBox
    • EO.Wpf DockView
    • EO.Wpf Gauge
    • EO.Wpf ListBox
    • EO.Wpf Menu
    • EO.Wpf MaskedEdit
    • EO.Wpf ProgressBar
    • EO.Wpf Slider
    • EO.Wpf SpinEdit
    • EO.Wpf SplitView
    • EO.Wpf TabControl
    • EO.Wpf TreeView
    • EO.Wpf Utility Controls
    • EO.Wpf WindowChrome
    • Sample Data Objects
  • Common Topics
  • Reference
Range Indicator

EO.Wpf SpinEdit can display a range indicator as the background. To enable range indicator, simply set ShowRangeIndicator to true:

XAML
<Window x:Class="Test.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:eo="http://schemas.essentialobjects.com/wpf/"
        xmlns:g="clr-namespace:System.Globalization;assembly=mscorlib"
        Title="MainWindow" Height="250" Width="350">
    <StackPanel Margin="10">
        <eo:SpinEdit ShowRangeIndicator="True" Value="5" />
    </StackPanel>
</Window>

The above code produces the following result:

You can use RangeIndicatorStyle to customize the style of the range indicator. The target type of the range indicator is Rectangle. The following code demonstrates this feature:

XAML
<Window x:Class="Test.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:eo="http://schemas.essentialobjects.com/wpf/"
        xmlns:g="clr-namespace:System.Globalization;assembly=mscorlib"
        Title="MainWindow" Height="250" Width="350">
    <StackPanel Margin="10">
        <eo:SpinEdit ShowRangeIndicator="True" Value="5">
            <eo:SpinEdit.RangeIndicatorStyle>
                <Style TargetType="Rectangle">
                    <Setter Property="Fill" Value="Green"></Setter>
                    <Setter Property="Height" Value="2"></Setter>
                    <Setter Property="VerticalAlignment" Value="Bottom"></Setter>
                </Style>
            </eo:SpinEdit.RangeIndicatorStyle>
        </eo:SpinEdit>
    </StackPanel>
</Window>

The above code produces the following result:

Note that it changed the color of the range indicator, and also moved the range indicator to the bottom of the editor so that it does not interfere with the text foreground.