void IEffectControlProvider.RegisterEffect(Effect effect) { PlatformEffect platformEffect = effect as PlatformEffect; if (platformEffect != null) { OnRegisterEffect(platformEffect); } }
public UIButton Get_iOSButton(Xamarin.Forms.Button button) { foreach (Xamarin.Forms.Effect e in button.Effects) { PlatformEffect platformEffect = e as PlatformEffect; if (platformEffect != null) { return(platformEffect.Control as UIButton); } } return(null); }
public Windows.UI.Xaml.Controls.Button Get_UWPButton(Xamarin.Forms.Button button) { foreach (Xamarin.Forms.Effect e in button.Effects) { PlatformEffect platformEffect = e as PlatformEffect; if (platformEffect != null) { return(platformEffect.Control as Windows.UI.Xaml.Controls.Button); } } return(null); }
protected virtual void OnRegisterEffect(PlatformEffect effect) { effect.SetContainer(this); }
void OnRegisterEffect(PlatformEffect effect) { effect.SetContainer(this); effect.SetControl(this); }
protected virtual void OnRegisterEffect(PlatformEffect effect) { effect.Container = this; effect.Control = Control; }
/// <summary> /// On register the effect /// </summary> /// <param name="effect">The effect to register.</param> void OnRegisterEffect(PlatformEffect effect) { effect.SetContainer(Element.Parent == null ? null : Platform.GetRenderer(Element.Parent)?.NativeView); effect.SetControl(NativeView); }
protected virtual void OnRegisterEffect(PlatformEffect effect) { //effect.Container = this; }
protected virtual void OnRegisterEffect(PlatformEffect effect) { effect.SetControl(Control); }
void OnRegisterEffect(PlatformEffect effect) { effect.Container = this; effect.Control = this; }
protected override void OnRegisterEffect(PlatformEffect effect) { base.OnRegisterEffect(effect); }
public static TView BindEffect <TView>(this TView view, PlatformEffect effect) where TView : View { view.Effects.Add(effect); return(view); }