public void PropertyChanged_Customer(object sender, global::System.ComponentModel.PropertyChangedEventArgs e) { CustomerDetailControl_obj1_Bindings bindings = TryGetBindingObject(); if (bindings != null) { string propName = e.PropertyName; global::WiredBrainCoffee.CustomersApp.Model.Customer obj = sender as global::WiredBrainCoffee.CustomersApp.Model.Customer; if (global::System.String.IsNullOrEmpty(propName)) { if (obj != null) { bindings.Update_Customer_FirstName(obj.FirstName, DATA_CHANGED); bindings.Update_Customer_LastName(obj.LastName, DATA_CHANGED); bindings.Update_Customer_IsDeveloper(obj.IsDeveloper, DATA_CHANGED); } } else { switch (propName) { case "FirstName": { if (obj != null) { bindings.Update_Customer_FirstName(obj.FirstName, DATA_CHANGED); } break; } case "LastName": { if (obj != null) { bindings.Update_Customer_LastName(obj.LastName, DATA_CHANGED); } break; } case "IsDeveloper": { if (obj != null) { bindings.Update_Customer_IsDeveloper(obj.IsDeveloper, DATA_CHANGED); } break; } default: break; } } } }
public void DependencyPropertyChanged_Customer(global::Windows.UI.Xaml.DependencyObject sender, global::Windows.UI.Xaml.DependencyProperty prop) { CustomerDetailControl_obj1_Bindings bindings = TryGetBindingObject(); if (bindings != null) { global::WiredBrainCoffee.CustomersApp.Controls.CustomerDetailControl obj = sender as global::WiredBrainCoffee.CustomersApp.Controls.CustomerDetailControl; if (obj != null) { bindings.Update_Customer(obj.Customer, DATA_CHANGED); } } }
public CustomerDetailControl_obj1_Bindings TryGetBindingObject() { CustomerDetailControl_obj1_Bindings bindingObject = null; if (weakRefToBindingObj != null) { weakRefToBindingObj.TryGetTarget(out bindingObject); if (bindingObject == null) { weakRefToBindingObj = null; ReleaseAllListeners(); } } return(bindingObject); }
public void UpdateChildListeners_(global::WiredBrainCoffee.CustomersApp.Controls.CustomerDetailControl obj) { CustomerDetailControl_obj1_Bindings bindings = TryGetBindingObject(); if (bindings != null) { if (bindings.dataRoot != null) { bindings.dataRoot.UnregisterPropertyChangedCallback(global::WiredBrainCoffee.CustomersApp.Controls.CustomerDetailControl.CustomerProperty, tokenDPC_Customer); } if (obj != null) { bindings.dataRoot = obj; tokenDPC_Customer = obj.RegisterPropertyChangedCallback(global::WiredBrainCoffee.CustomersApp.Controls.CustomerDetailControl.CustomerProperty, DependencyPropertyChanged_Customer); } } }
public global::Windows.UI.Xaml.Markup.IComponentConnector GetBindingConnector(int connectionId, object target) { global::Windows.UI.Xaml.Markup.IComponentConnector returnValue = null; switch (connectionId) { case 1: // Controls\CustomerDetailControl.xaml line 1 { global::Windows.UI.Xaml.Controls.UserControl element1 = (global::Windows.UI.Xaml.Controls.UserControl)target; CustomerDetailControl_obj1_Bindings bindings = new CustomerDetailControl_obj1_Bindings(); returnValue = bindings; bindings.SetDataRoot(this); this.Bindings = bindings; element1.Loading += bindings.Loading; global::Windows.UI.Xaml.Markup.XamlBindingHelper.SetDataTemplateComponent(element1, bindings); } break; } return(returnValue); }
public CustomerDetailControl_obj1_BindingsTracking(CustomerDetailControl_obj1_Bindings obj) { weakRefToBindingObj = new global::System.WeakReference <CustomerDetailControl_obj1_Bindings>(obj); }