Example #1
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: // MyUserControl1.xaml line 1
     {
         global::Windows.UI.Xaml.Controls.UserControl element1 = (global::Windows.UI.Xaml.Controls.UserControl)target;
         MyUserControl1_obj1_Bindings bindings = new MyUserControl1_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 global::Windows.UI.Xaml.Markup.IComponentConnector GetBindingConnector(int connectionId, object target)
        {
            global::Windows.UI.Xaml.Markup.IComponentConnector returnValue = null;
            switch (connectionId)
            {
            case 1:
            {
                global::Windows.UI.Xaml.Controls.UserControl element1 = (global::Windows.UI.Xaml.Controls.UserControl)target;
                MyUserControl1_obj1_Bindings bindings = new MyUserControl1_obj1_Bindings();
                returnValue = bindings;
                bindings.SetDataRoot(this);
                this.Bindings     = bindings;
                element1.Loading += bindings.Loading;
            }
            break;

            case 3:
            {
                global::Windows.UI.Xaml.Controls.StackPanel element3 = (global::Windows.UI.Xaml.Controls.StackPanel)target;
                MyUserControl1_obj3_Bindings bindings = new MyUserControl1_obj3_Bindings();
                returnValue = bindings;
                bindings.SetDataRoot((global::ObservableCollectionExample.Models.Contact)element3.DataContext);
                element3.DataContextChanged += bindings.DataContextChangedHandler;
                global::Windows.UI.Xaml.DataTemplate.SetExtensionInstance(element3, bindings);
            }
            break;

            case 11:
            {
                global::Windows.UI.Xaml.Controls.Image element11 = (global::Windows.UI.Xaml.Controls.Image)target;
                MyUserControl1_obj11_Bindings          bindings  = new MyUserControl1_obj11_Bindings();
                returnValue = bindings;
                bindings.SetDataRoot((global::ObservableCollectionExample.Models.Icon)element11.DataContext);
                element11.DataContextChanged += bindings.DataContextChangedHandler;
                global::Windows.UI.Xaml.DataTemplate.SetExtensionInstance(element11, bindings);
            }
            break;
            }
            return(returnValue);
        }