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
|
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
#if UITEST
using Xamarin.UITest;
using NUnit.Framework;
#endif
namespace Xamarin.Forms.Controls.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 37290, "[WinRT/UWP] Setting ActivityIndicator.IsRunning=\"false\" shows the ActivityIndicator", PlatformAffected.WinRT)]
public class Bugzilla37290 : TestContentPage
{
protected override void Init()
{
var activityIndicator = new ActivityIndicator
{
IsRunning = false,
Opacity = 0.4
};
var opacityStepper = new Stepper
{
Minimum = 0.1,
Maximum = 1.0,
Increment = .1,
Value = 0.4
};
var stepperValue = new Label
{
Text = "Current Value: " + opacityStepper.Value.ToString()
};
opacityStepper.ValueChanged += (s, e) =>
{
activityIndicator.Opacity = opacityStepper.Value;
stepperValue.Text = "Current Value: " + opacityStepper.Value.ToString();
};
Content = new StackLayout
{
Children =
{
new Label
{
Text = "The activity indicator below should not be initially visible. You can also use the stepper to change its Opacity value."
},
activityIndicator,
new Button
{
Text = "Click to toggle IsRunning on the ActivityIndicator",
Command = new Command(() => activityIndicator.IsRunning = !activityIndicator.IsRunning)
},
new StackLayout()
{
Orientation = StackOrientation.Horizontal,
Children =
{
opacityStepper,
stepperValue
}
}
}
};
}
}
}
|