-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathRangeSlider.xaml
136 lines (116 loc) · 8.47 KB
/
RangeSlider.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<View:SampleLayout
x:Class="SampleBrowser.Editors.Controls.RangeSlider.RangeSliderDemo"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:prop="using:Editors"
xmlns:local="using:Editors"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:View="using:Common"
mc:Ignorable="d" xmlns:syncfusion="using:Syncfusion.UI.Xaml.Controls.Input"
d:DesignHeight="300"
d:DesignWidth="400">
<UserControl.DataContext>
<local:RangeSliderProperties/>
</UserControl.DataContext>
<View:SampleLayout.Sample>
<ContentControl HorizontalAlignment="Center" VerticalAlignment="Center">
<Viewbox x:Name="controlView" MaxHeight="300" MaxWidth="400" Margin="20">
<Grid>
<Grid.Resources>
<SolidColorBrush x:Key="AccentBrush">#FF45ADEB</SolidColorBrush>
<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="16"/>
</Style>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Margin="10 5" x:Name="DepartureText">
<Run Text="Departure"/>
</TextBlock>
<syncfusion:SfRangeSlider x:Name="Departure" Margin="10 5" Value="2" Grid.Row="1" Minimum="{Binding Minimum,Mode=TwoWay}" Maximum="{Binding Maximum,Mode=TwoWay}"
RangeStart="5" RangeEnd="30" TickPlacement="{Binding TickPlacement,Mode=TwoWay}" MoveToPoint="{Binding MoveToPoint,Mode=TwoWay}"
SnapsTo="{Binding SnapTo,Mode=TwoWay}" LargeChange="{Binding Largechange,Mode=TwoWay}" SmallChange="{Binding SmallChange,Mode=TwoWay}"
ShowRange="{Binding ShowRange,Mode=TwoWay}" MinWidth="300" TickFrequency="{Binding Ticks,Mode=TwoWay}"
IsDirectionReversed="{Binding ReverseDirection,Mode=TwoWay}"/>
<TextBlock Margin="10 5" Grid.Row="2" x:Name="ArrivalText">
<Run Text="Arrival"/>
</TextBlock>
<syncfusion:SfRangeSlider x:Name="Arrival" RangeStart="18" RangeEnd="60" Grid.Row="3" MinWidth="300" TickPlacement="{Binding TickPlacement,Mode=TwoWay}"
Margin="10 5" TickFrequency="{Binding Ticks,Mode=TwoWay}" MoveToPoint="{Binding MoveToPoint,Mode=TwoWay}"
SnapsTo="{Binding SnapTo,Mode=TwoWay}" LargeChange="{Binding Largechange,Mode=TwoWay}" SmallChange="{Binding SmallChange,Mode=TwoWay}"
ShowRange="{Binding ShowRange,Mode=TwoWay}" IsDirectionReversed="{Binding ReverseDirection,Mode=TwoWay}"
Minimum="{Binding Minimum,Mode=TwoWay}" Maximum="{Binding Maximum,Mode=TwoWay}"/>
</Grid>
</Viewbox>
</ContentControl>
</View:SampleLayout.Sample>
<View:SampleLayout.Setting>
<ContentControl>
<ScrollViewer VerticalScrollBarVisibility="Hidden">
<Grid x:Name="settings" Width="300" Margin="10 0 10 10">
<Grid>
<Grid.Resources>
<Style TargetType="syncfusion:SfNumericUpDown">
<Setter Property="BlockCharactersOnTextInput" Value="True"/>
</Style>
<Style TargetType="syncfusion:SfNumericTextBox">
<Setter Property="BlockCharactersOnTextInput" Value="True"/>
</Style>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="Orientation" Margin="10 5"/>
<ComboBox IsTabStop="False" x:Name="orientation" Grid.Row="1" Margin="10 5" SelectionChanged="orientation_SelectionChanged" Loaded="orientation_Loaded_1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"></ComboBox>
<TextBlock Text="Tick Placement" Margin="10 5" Grid.Row="2"/>
<ComboBox IsTabStop="False" x:Name="tickPlacement" Margin="10 5" Loaded="tickPlacement_Loaded_1" SelectedItem="{Binding TickPlacement,Mode=TwoWay}" Grid.Row="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"></ComboBox>
<TextBlock Text="Tick Frequency" Margin="10 5" Grid.Row="4"/>
<syncfusion:SfNumericUpDown Grid.Row="5" SmallChange="5" FormatString="0 ticks" Maximum="50" Minimum="0" Value="{Binding Ticks,Mode=TwoWay}" Margin="10" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
<TextBlock Text="Minimum" Margin="10 5" Grid.Row="8"/>
<syncfusion:SfNumericTextBox Grid.Row="9" Margin="10 5" Value="{Binding Minimum,Mode=TwoWay}" x:Name="min" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
<TextBlock Text="Maximum" Grid.Row="10" Margin="10 5"/>
<syncfusion:SfNumericTextBox Grid.Row="11" Margin="10 5" Value="{Binding Maximum,Mode=TwoWay}" x:Name="max" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
<TextBlock Text="LargeChange" Margin="10 5" Grid.Row="12"/>
<syncfusion:SfNumericTextBox Grid.Row="13" Margin="10 5" Value="{Binding Largechange,Mode=TwoWay}" x:Name="lar" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
<TextBlock Text="SmallChange" Grid.Row="14" Margin="10 5"/>
<syncfusion:SfNumericTextBox Grid.Row="15" Margin="10 5" Value="{Binding SmallChange,Mode=TwoWay}" x:Name="sml" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
<TextBlock Text="MovePointTo" Margin="10 5" Grid.Row="16"/>
<ComboBox IsTabStop="False" x:Name="movepointto" Margin="10 5" Loaded="movepointto_loaded" SelectedItem="{Binding MovePointTo,Mode=TwoWay}" SelectionChanged="movepointto_OnSelectionChanged" Grid.Row="17" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"></ComboBox>
<TextBlock Text="Snaps To" Margin="10 5" Grid.Row="18"/>
<ComboBox IsTabStop="False" x:Name="snapto" Margin="10 5" Loaded="snapto_loaded" SelectedItem="{Binding SnapTo,Mode=TwoWay}" SelectionChanged="snapsto_OnSelectionChanged" Grid.Row="19" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"></ComboBox>
</Grid>
</Grid>
</ScrollViewer>
</ContentControl>
</View:SampleLayout.Setting>
</View:SampleLayout>