26 строки
674 B
C#
26 строки
674 B
C#
|
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);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|