Exemple #1
0
 public void BindCommand(string bindingObject, string eventName, string viewModelCommand)
 {
     ebs.Add(new EventBindingSettings()
     {
         BindingObject    = bindingObject,
         EventName        = eventName,
         ViewModelCommand = viewModelCommand,
         ResourceId       = ControlUtil.GetResourceId(bindingObject)
     });
 }
Exemple #2
0
 public void BindProperty(string bindingObject, string bindingProperty, string eventName, string viewModelProperty, string format)
 {
     pbs.Add(new PropertyBindingSettings()
     {
         BindingObject     = bindingObject,
         BindingProperty   = bindingProperty,
         ViewModelProperty = viewModelProperty,
         EventName         = eventName,
         ResourceId        = ControlUtil.GetResourceId(bindingObject),
         Format            = format
     });
 }
Exemple #3
0
 public static void CreateControls <T> (this T obj, DroidView view)
 {
     foreach (var prop in typeof(T).GetProperties(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public))
     {
         var pn = prop.Name;
         if (prop.PropertyType.IsSubclassOf(typeof(DroidView)))
         {
             try
             {
                 var resourceId = ControlUtil.GetResourceId(pn);
                 var ctrl       = view.FindViewById(resourceId);
                 prop.SetValue(obj, ctrl);
             }
             catch {}
         }
     }
 }