summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls/GalleryPages/SliderGallery.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls/GalleryPages/SliderGallery.cs')
-rw-r--r--Xamarin.Forms.Controls/GalleryPages/SliderGallery.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls/GalleryPages/SliderGallery.cs b/Xamarin.Forms.Controls/GalleryPages/SliderGallery.cs
new file mode 100644
index 00000000..4fd9f20c
--- /dev/null
+++ b/Xamarin.Forms.Controls/GalleryPages/SliderGallery.cs
@@ -0,0 +1,33 @@
+´╗┐using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Xamarin.Forms.Controls
+{
+ public class SliderGallery : ContentPage
+ {
+ public SliderGallery ()
+ {
+ var normal = new Slider (20, 100, 20);
+ var disabled = new Slider (0, 1, 0);
+ var transparent = new Slider (0, 1, 0);
+ var valueLabel = new Label { Text = normal.Value.ToString () };
+
+ disabled.IsEnabled = false;
+ transparent.Opacity = .5;
+ normal.ValueChanged += (sender, e) => { valueLabel.Text = normal.Value.ToString (); };
+
+ Content = new StackLayout {
+ Padding = new Thickness (40),
+ Children = {
+ normal,
+ disabled,
+ transparent,
+ valueLabel
+ }
+ };
+ }
+ }
+}