Skip to content

Commit

Permalink
Slider | Add Slider #32
Browse files Browse the repository at this point in the history
  • Loading branch information
BAL4-R committed Sep 4, 2023
1 parent a9dc886 commit c7a997c
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 42 deletions.
2 changes: 1 addition & 1 deletion DemoApp/DemoApp/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ public MainPage()
"ProgressBar",
"RadioButton",
"SegmentedControl",
"Slider",
"Spinner",
"Switch",
"Slider",
"TabbedPage",
"Toast"
};
Expand Down
86 changes: 45 additions & 41 deletions DemoApp/DemoApp/Views/SliderSamplePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,48 @@
xmlns:modus="clr-namespace:Trimble.Modus.Components;assembly=Trimble.Modus.Components"
xmlns:local="clr-namespace:DemoApp.ViewModels"
Title="Slider">
<StackLayout Orientation="Vertical">
<modus:TMInput Text="{Binding MinimumValueText, Mode=TwoWay}"
Placeholder="Enter minimum value"
TitleText="Minimum value" />
<modus:TMInput Text="{Binding MaximumValueText, Mode=TwoWay}"
Placeholder="Enter Maximum value"
TitleText="Maximum value" />
<modus:TMRadioButtonGroup x:Name="SliderSize"
SelectedIndex="1"
SelectedRadioButtonChangedCommand="{Binding SizeRadioButtonCommand}">
<modus:TMRadioButton Text="Small"
Value="0" />
<modus:TMRadioButton Text="Medium"
Value="1" />
<modus:TMRadioButton Text="Large"
Value="2" />
</modus:TMRadioButtonGroup>
<modus:TMCheckBox Text="Show Steps"
IsChecked="{Binding ShowSteps, Mode=TwoWay}" />
<modus:TMCheckBox Text="Show ToolTips"
IsChecked="{Binding ShowTooltip, Mode=TwoWay}" />
<modus:TMCheckBox Text="IsEnable"
IsChecked="{Binding IsEnabled, Mode=TwoWay}" />
<modus:TMRangeSlider MaximumValue="{Binding MaximumValue}"
MinimumValue="{Binding MinimumValue}"
Size="{Binding Source={RelativeSource AncestorType={x:Type local:SliderViewModel}}, Path=Size}"
ShowSteps="{Binding ShowSteps}"
ShowToolTip="{Binding ShowTooltip}"
IsEnabled="{Binding IsEnabled}"
RightIconSource="placeholder.png"
LeftIconSource="placeholder.png" />
<modus:TMSlider MaximumValue="{Binding MaximumValue}"
MinimumValue="{Binding MinimumValue}"
Size="{Binding Source={RelativeSource AncestorType={x:Type local:SliderViewModel}}, Path=Size}"
ShowSteps="{Binding ShowSteps}"
ShowToolTip="{Binding ShowTooltip}"
IsEnabled="{Binding IsEnabled}"
RightIconSource="placeholder.png"
LeftIconSource="placeholder.png" />
</StackLayout>
</ContentPage>
<ScrollView Margin="4">
<StackLayout Orientation="Vertical">
<modus:TMInput Text="{Binding MinimumValueText, Mode=TwoWay}"
Placeholder="Enter minimum value"
TitleText="Minimum value" />
<modus:TMInput Text="{Binding MaximumValueText, Mode=TwoWay}"
Placeholder="Enter Maximum value"
TitleText="Maximum value" />
<modus:TMRadioButtonGroup x:Name="SliderSize"
SelectedIndex="1"
SelectedRadioButtonChangedCommand="{Binding SizeRadioButtonCommand}">
<modus:TMRadioButton Text="Small"
Value="0" />
<modus:TMRadioButton Text="Medium"
Value="1" />
<modus:TMRadioButton Text="Large"
Value="2" />
</modus:TMRadioButtonGroup>
<modus:TMCheckBox Text="Show Steps"
IsChecked="{Binding ShowSteps, Mode=TwoWay}" />
<modus:TMCheckBox Text="Show ToolTips"
IsChecked="{Binding ShowTooltip, Mode=TwoWay}" />
<modus:TMCheckBox Text="IsEnable"
IsChecked="{Binding IsEnabled, Mode=TwoWay}" />
<modus:TMRangeSlider MaximumValue="{Binding MaximumValue}"
MinimumValue="{Binding MinimumValue}"
Size="{Binding Source={RelativeSource AncestorType={x:Type local:SliderViewModel}}, Path=Size}"
ShowSteps="{Binding ShowSteps}"
ShowToolTip="{Binding ShowTooltip}"
IsEnabled="{Binding IsEnabled}"
RightIconSource="placeholder.png"
LeftIconSource="placeholder.png"
Padding="0,15" />
<modus:TMSlider MaximumValue="{Binding MaximumValue}"
MinimumValue="{Binding MinimumValue}"
Size="{Binding Source={RelativeSource AncestorType={x:Type local:SliderViewModel}}, Path=Size}"
ShowSteps="{Binding ShowSteps}"
ShowToolTip="{Binding ShowTooltip}"
IsEnabled="{Binding IsEnabled}"
RightIconSource="placeholder.png"
LeftIconSource="placeholder.png"
Padding="0,15" />
</StackLayout>
</ScrollView>
</ContentPage>

0 comments on commit c7a997c

Please sign in to comment.