Example #1
0
                public FriendDetailControl_obj1_Bindings TryGetBindingObject()
                {
                    FriendDetailControl_obj1_Bindings bindingObject = null;

                    if (weakRefToBindingObj != null)
                    {
                        weakRefToBindingObj.TryGetTarget(out bindingObject);
                        if (bindingObject == null)
                        {
                            weakRefToBindingObj = null;
                            ReleaseAllListeners();
                        }
                    }
                    return(bindingObject);
                }
Example #2
0
 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\FriendDetailControl.xaml line 1
     {
         global::Windows.UI.Xaml.Controls.UserControl element1 = (global::Windows.UI.Xaml.Controls.UserControl)target;
         FriendDetailControl_obj1_Bindings            bindings = new FriendDetailControl_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);
 }
Example #3
0
                public void PropertyChanged_Friend(object sender, global::System.ComponentModel.PropertyChangedEventArgs e)
                {
                    FriendDetailControl_obj1_Bindings bindings = TryGetBindingObject();

                    if (bindings != null)
                    {
                        string propName = e.PropertyName;
                        global::FriendEditor.Model.Friend obj = sender as global::FriendEditor.Model.Friend;
                        if (global::System.String.IsNullOrEmpty(propName))
                        {
                            if (obj != null)
                            {
                                bindings.Update_Friend_FirstName(obj.FirstName, DATA_CHANGED);
                                bindings.Update_Friend_IsDeveloper(obj.IsDeveloper, DATA_CHANGED);
                                bindings.Update_Friend_LastName(obj.LastName, DATA_CHANGED);
                            }
                            else
                            {
                                bindings.UpdateFallback_Friend_IsDeveloper(DATA_CHANGED);
                            }
                        }
                        else
                        {
                            switch (propName)
                            {
                            case "FirstName":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_Friend_FirstName(obj.FirstName, DATA_CHANGED);
                                }
                                break;
                            }

                            case "IsDeveloper":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_Friend_IsDeveloper(obj.IsDeveloper, DATA_CHANGED);
                                }
                                else
                                {
                                    bindings.UpdateFallback_Friend_IsDeveloper(DATA_CHANGED);
                                }
                                break;
                            }

                            case "LastName":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_Friend_LastName(obj.LastName, DATA_CHANGED);
                                }
                                break;
                            }

                            default:
                                break;
                            }
                        }
                        bindings.CompleteUpdate(DATA_CHANGED);
                    }
                }
Example #4
0
 public FriendDetailControl_obj1_BindingsTracking(FriendDetailControl_obj1_Bindings obj)
 {
     weakRefToBindingObj = new global::System.WeakReference <FriendDetailControl_obj1_Bindings>(obj);
 }