-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Issue3150.cs
48 lines (44 loc) · 1.16 KB
/
Issue3150.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
46
47
48
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Controls.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 3150, "IsClippedToBounds on (Fast Renderer) Frame not working", PlatformAffected.Android)]
class Issue3150 : TestContentPage
{
protected override void Init()
{
const string buttonText = "Toggle IsClippedToBounds: ";
var frame = new Frame
{
BackgroundColor = Color.Blue,
HorizontalOptions = LayoutOptions.CenterAndExpand,
VerticalOptions = LayoutOptions.CenterAndExpand,
IsClippedToBounds = false,
Content = new BoxView
{
BackgroundColor = Color.Yellow,
TranslationX = 50
}
};
Button button = null;
button = new Button()
{
Text = $"{buttonText}{frame.IsClippedToBounds}",
Command = new Command(() =>
{
frame.IsClippedToBounds = !frame.IsClippedToBounds;
button.Text = $"{buttonText}{frame.IsClippedToBounds}";
})
};
Content = new StackLayout
{
Children = {
new Label { Text = "If the yellow box extends past the end of the blue box, the test has passed" },
frame,
button
}
};
}
}
}