I'm working on a WPF project with the MVVM pattern and i need to create a user control like the following image:
Which has a vertical slider, a range of numbers and a graph that represent the selected value over the total being able the user to increment and decrease the value with the slider.
The problem is that i don't know how to create such a slider and i am also having some problems to draw the colour bar filled.
Any help would be very appreciated. Thanks in advance.
This is what i have in xaml:
<UserControl x:Class="Tenaris.SM.View.CCMOperativeScreen.View.Controls.SetPointSteelLevel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<UserControl.Resources>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="7*"/>
</Grid.ColumnDefinitions>
<Grid>
<Slider Orientation="Vertical"></Slider>
</Grid>
<Grid Grid.Column="1" HorizontalAlignment="Left">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Style="{StaticResource GridValueCell}" Text="88" />
<TextBlock Style="{StaticResource GridValueCell}" Text="87" Grid.Row="1"/>
<TextBlock Style="{StaticResource GridValueCell}" Text="86" Grid.Row="2"/>
<TextBlock Style="{StaticResource SetPointPresetNumber}" Text="85" Grid.Row="3"/>
<TextBlock Style="{StaticResource SetPointPresetNumber}" Text="84" Grid.Row="4"/>
<TextBlock Style="{StaticResource SetPointPresetNumber}" Text="83" Grid.Row="5"/>
<TextBlock Style="{StaticResource SetPointPresetNumber}" Text="82" Grid.Row="6"/>
<TextBlock Style="{StaticResource GridValueCell}" Text="81" Grid.Row="7"/>
<TextBlock Style="{StaticResource GridValueCell}" Text="80" Grid.Row="8"/>
<TextBlock Style="{StaticResource GridValueCell}" Text="79" Grid.Row="9"/>
</Grid>
<Grid Grid.Column="2">
<Rectangle>
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Color="#303030" Offset="0" />
<GradientStop Color="LightGray" Offset=".5"/>
<GradientStop Color="#303030" Offset="1" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
</Grid>
</Grid>