CallDataMethod trigger in Xamarin Forms
Here’s a very simple implementation of a CallDataMethod trigger in Xamarin Forms: public class CallDataMethod: TriggerAction < VisualElement > { public string Method { get ; set ; } #region implemented abstract members of TriggerAction protected override void Invoke (VisualElement sender) { MethodInfo method = sender.GetType ().GetRuntimeMethod (Method, new Type[ 0 ]); if (method != null ) { ParameterInfo[] parameters = method.GetParameters (); if (parameters.Length == 0 ) method.Invoke (sender, null ); } } #endregion } For a demo, let’s say we have two text-boxes (Entry control in Xamarin Forms) and you want to enable the second one when the first has ten characters: <? xml version = " 1.0 " encoding = " UTF-8 " ?> < ContentPage xmlns = " http://xamarin.com/schemas/2014/forms ...