blob: 9eb73ab1cb6457da5fb86471407e0963953da51d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
using Xamarin.Forms.Platform.Android;
namespace Xamarin.Forms.ControlGallery.Android
{
public class BorderEffect : PlatformEffect
{
protected override void OnAttached ()
{
Control.SetBackgroundColor (global::Android.Graphics.Color.Aqua);
var childLabel = (Element as ScrollView)?.Content as Label;
if (childLabel != null)
childLabel.Text = "Success";
}
protected override void OnDetached ()
{
Control.SetBackgroundColor(global::Android.Graphics.Color.Beige);
}
}
}
|