maui-linux/Xamarin.Forms.ControlGaller.../AttachedStateEffectRenderer.cs

26 строки
674 B
C#
Исходник Обычный вид История

2018-04-30 19:46:03 +03:00
using System;
using System.Linq;
using Xamarin.Forms;
using Xamarin.Forms.ControlGallery.Android;
using Xamarin.Forms.Controls.Effects;
using Xamarin.Forms.Platform.Android;
[assembly: ExportEffect(typeof(AttachedStateEffectRenderer), AttachedStateEffect.EffectName)]
namespace Xamarin.Forms.ControlGallery.Android
{
public class AttachedStateEffectRenderer : PlatformEffect
{
public AttachedStateEffect MyEffect { get; private set; }
protected override void OnAttached()
{
MyEffect = Element.Effects.OfType<AttachedStateEffect>().First();
MyEffect.Attached(Element);
}
protected override void OnDetached()
{
MyEffect.Detached(Element);
}
}
}