-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Issue1729.cs
45 lines (38 loc) · 1.1 KB
/
Issue1729.cs
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
using Xamarin.Forms.PlatformConfiguration;
using Xamarin.Forms.PlatformConfiguration.iOSSpecific;
namespace Xamarin.Forms.Controls.Issues
{
#if UITEST
[NUnit.Framework.Category(Core.UITests.UITestCategories.Github5000)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 1729, "iOS PlatformSpecific for UISlider", PlatformAffected.iOS)]
public class Issue1729 : TestContentPage
{
Slider _slider1;
protected override void Init()
{
_slider1 = new Slider();
var label = new Label { Text = "Enable TapOnUpdate" };
var toggle = new Switch { IsToggled = false };
toggle.Toggled += Toggled;
var stackLayout = new StackLayout
{
Children = { label, toggle, _slider1 },
Padding = new Thickness(0, 20, 0, 0)
};
Content = stackLayout;
}
void Toggled(object sender, ToggledEventArgs e)
{
_slider1.On<PlatformConfiguration.iOS>().SetUpdateOnTap(((Switch)sender).IsToggled);
}
}
}