#pragma checksum "C:\Users\robko\source\repos4\Golf\GolfComp\Views\TeamListPage.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "212A313485971AD24C05BD48D1F1A4C3673AE03F6181524CBF409A56DA638765"
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace GolfComp.Views
{
    partial class TeamListPage : 
        global::Windows.UI.Xaml.Controls.Page, 
        global::Windows.UI.Xaml.Markup.IComponentConnector,
        global::Windows.UI.Xaml.Markup.IComponentConnector2
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.19041.685")]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private static class XamlBindingSetters
        {
            public static void Set_Windows_UI_Xaml_Controls_Control_IsEnabled(global::Windows.UI.Xaml.Controls.Control obj, global::System.Boolean value)
            {
                obj.IsEnabled = value;
            }
            public static void Set_Telerik_UI_Xaml_Controls_Grid_RadDataGrid_SelectedItem(global::Telerik.UI.Xaml.Controls.Grid.RadDataGrid obj, global::System.Object value, string targetNullValue)
            {
                if (value == null && targetNullValue != null)
                {
                    value = (global::System.Object) global::Windows.UI.Xaml.Markup.XamlBindingHelper.ConvertValue(typeof(global::System.Object), targetNullValue);
                }
                obj.SelectedItem = value;
            }
            public static void Set_Telerik_UI_Xaml_Controls_Grid_DataGridComboBoxColumn_ItemsSource(global::Telerik.UI.Xaml.Controls.Grid.DataGridComboBoxColumn obj, global::System.Object value, string targetNullValue)
            {
                if (value == null && targetNullValue != null)
                {
                    value = (global::System.Object) global::Windows.UI.Xaml.Markup.XamlBindingHelper.ConvertValue(typeof(global::System.Object), targetNullValue);
                }
                obj.ItemsSource = value;
            }
        };

        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.19041.685")]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private class TeamListPage_obj1_Bindings :
            global::Windows.UI.Xaml.Markup.IDataTemplateComponent,
            global::Windows.UI.Xaml.Markup.IXamlBindScopeDiagnostics,
            global::Windows.UI.Xaml.Markup.IComponentConnector,
            ITeamListPage_Bindings
        {
            private global::GolfComp.Views.TeamListPage dataRoot;
            private bool initialized = false;
            private const int NOT_PHASED = (1 << 31);
            private const int DATA_CHANGED = (1 << 30);

            // Fields for each control that has bindings.
            private global::Windows.UI.Xaml.Controls.CommandBar obj2;
            private global::Telerik.UI.Xaml.Controls.Grid.RadDataGrid obj4;
            private global::Telerik.UI.Xaml.Controls.Grid.DataGridComboBoxColumn obj5;

            // Static fields for each binding's enabled/disabled state
            private static bool isobj2IsEnabledDisabled = false;
            private static bool isobj4SelectedItemDisabled = false;
            private static bool isobj5ItemsSourceDisabled = false;

            private TeamListPage_obj1_BindingsTracking bindingsTracking;

            public TeamListPage_obj1_Bindings()
            {
                this.bindingsTracking = new TeamListPage_obj1_BindingsTracking(this);
            }

            public void Disable(int lineNumber, int columnNumber)
            {
                if (lineNumber == 20 && columnNumber == 79)
                {
                    isobj2IsEnabledDisabled = true;
                }
                else if (lineNumber == 62 && columnNumber == 17)
                {
                    isobj4SelectedItemDisabled = true;
                }
                else if (lineNumber == 66 && columnNumber == 57)
                {
                    isobj5ItemsSourceDisabled = true;
                }
            }

            // IComponentConnector

            public void Connect(int connectionId, global::System.Object target)
            {
                switch(connectionId)
                {
                    case 2: // Views\TeamListPage.xaml line 20
                        this.obj2 = (global::Windows.UI.Xaml.Controls.CommandBar)target;
                        break;
                    case 4: // Views\TeamListPage.xaml line 51
                        this.obj4 = (global::Telerik.UI.Xaml.Controls.Grid.RadDataGrid)target;
                        this.bindingsTracking.RegisterTwoWayListener_4(this.obj4);
                        break;
                    case 5: // Views\TeamListPage.xaml line 64
                        this.obj5 = (global::Telerik.UI.Xaml.Controls.Grid.DataGridComboBoxColumn)target;
                        break;
                    default:
                        break;
                }
            }

            // IDataTemplateComponent

            public void ProcessBindings(global::System.Object item, int itemIndex, int phase, out int nextPhase)
            {
                nextPhase = -1;
            }

            public void Recycle()
            {
                return;
            }

            // ITeamListPage_Bindings

            public void Initialize()
            {
                if (!this.initialized)
                {
                    this.Update();
                }
            }
            
            public void Update()
            {
                this.Update_(this.dataRoot, NOT_PHASED);
                this.initialized = true;
            }

            public void StopTracking()
            {
                this.bindingsTracking.ReleaseAllListeners();
                this.initialized = false;
            }

            public void DisconnectUnloadedObject(int connectionId)
            {
                throw new global::System.ArgumentException("No unloadable elements to disconnect.");
            }

            public bool SetDataRoot(global::System.Object newDataRoot)
            {
                this.bindingsTracking.ReleaseAllListeners();
                if (newDataRoot != null)
                {
                    this.dataRoot = (global::GolfComp.Views.TeamListPage)newDataRoot;
                    return true;
                }
                return false;
            }

            public void Loading(global::Windows.UI.Xaml.FrameworkElement src, object data)
            {
                this.Initialize();
            }

            // Update methods for each path node used in binding steps.
            private void Update_(global::GolfComp.Views.TeamListPage obj, int phase)
            {
                this.bindingsTracking.UpdateChildListeners_(obj);
                if (obj != null)
                {
                    if ((phase & (NOT_PHASED | (1 << 0))) != 0)
                    {
                        this.Update_enableCommandBar(obj.enableCommandBar, phase);
                    }
                    if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0)
                    {
                        this.Update_SelectedItem(obj.SelectedItem, phase);
                    }
                    if ((phase & (NOT_PHASED | (1 << 0))) != 0)
                    {
                        this.Update_klasse(obj.klasse, phase);
                    }
                }
            }
            private void Update_enableCommandBar(global::System.Boolean obj, int phase)
            {
                if ((phase & ((1 << 0) | NOT_PHASED )) != 0)
                {
                    // Views\TeamListPage.xaml line 20
                    if (!isobj2IsEnabledDisabled)
                    {
                        XamlBindingSetters.Set_Windows_UI_Xaml_Controls_Control_IsEnabled(this.obj2, obj);
                    }
                }
            }
            private void Update_SelectedItem(global::DataAccessLibrary.Models.TeamModel obj, int phase)
            {
                this.bindingsTracking.UpdateChildListeners_SelectedItem(obj);
                if ((phase & ((1 << 0) | NOT_PHASED | DATA_CHANGED)) != 0)
                {
                    // Views\TeamListPage.xaml line 51
                    if (!isobj4SelectedItemDisabled)
                    {
                        XamlBindingSetters.Set_Telerik_UI_Xaml_Controls_Grid_RadDataGrid_SelectedItem(this.obj4, obj, null);
                    }
                }
            }
            private void Update_klasse(global::System.Collections.ObjectModel.ObservableCollection<global::DataAccessLibrary.Models.KlasseModel> obj, int phase)
            {
                if ((phase & ((1 << 0) | NOT_PHASED )) != 0)
                {
                    // Views\TeamListPage.xaml line 64
                    if (!isobj5ItemsSourceDisabled)
                    {
                        XamlBindingSetters.Set_Telerik_UI_Xaml_Controls_Grid_DataGridComboBoxColumn_ItemsSource(this.obj5, obj, null);
                    }
                }
            }
            private void UpdateTwoWay_4_SelectedItem()
            {
                if (this.initialized)
                {
                    if (this.dataRoot != null)
                    {
                        this.dataRoot.SelectedItem = (global::DataAccessLibrary.Models.TeamModel)this.obj4.SelectedItem;
                    }
                }
            }

            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.19041.685")]
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            private class TeamListPage_obj1_BindingsTracking
            {
                private global::System.WeakReference<TeamListPage_obj1_Bindings> weakRefToBindingObj; 

                public TeamListPage_obj1_BindingsTracking(TeamListPage_obj1_Bindings obj)
                {
                    weakRefToBindingObj = new global::System.WeakReference<TeamListPage_obj1_Bindings>(obj);
                }

                public TeamListPage_obj1_Bindings TryGetBindingObject()
                {
                    TeamListPage_obj1_Bindings bindingObject = null;
                    if (weakRefToBindingObj != null)
                    {
                        weakRefToBindingObj.TryGetTarget(out bindingObject);
                        if (bindingObject == null)
                        {
                            weakRefToBindingObj = null;
                            ReleaseAllListeners();
                        }
                    }
                    return bindingObject;
                }

                public void ReleaseAllListeners()
                {
                    UpdateChildListeners_(null);
                    UpdateChildListeners_SelectedItem(null);
                }

                public void PropertyChanged_(object sender, global::System.ComponentModel.PropertyChangedEventArgs e)
                {
                    TeamListPage_obj1_Bindings bindings = TryGetBindingObject();
                    if (bindings != null)
                    {
                        string propName = e.PropertyName;
                        global::GolfComp.Views.TeamListPage obj = sender as global::GolfComp.Views.TeamListPage;
                        if (global::System.String.IsNullOrEmpty(propName))
                        {
                            if (obj != null)
                            {
                                bindings.Update_SelectedItem(obj.SelectedItem, DATA_CHANGED);
                            }
                        }
                        else
                        {
                            switch (propName)
                            {
                                case "SelectedItem":
                                {
                                    if (obj != null)
                                    {
                                        bindings.Update_SelectedItem(obj.SelectedItem, DATA_CHANGED);
                                    }
                                    break;
                                }
                                default:
                                    break;
                            }
                        }
                    }
                }
                public void UpdateChildListeners_(global::GolfComp.Views.TeamListPage obj)
                {
                    TeamListPage_obj1_Bindings bindings = TryGetBindingObject();
                    if (bindings != null)
                    {
                        if (bindings.dataRoot != null)
                        {
                            ((global::System.ComponentModel.INotifyPropertyChanged)bindings.dataRoot).PropertyChanged -= PropertyChanged_;
                        }
                        if (obj != null)
                        {
                            bindings.dataRoot = obj;
                            ((global::System.ComponentModel.INotifyPropertyChanged)obj).PropertyChanged += PropertyChanged_;
                        }
                    }
                }
                public void PropertyChanged_SelectedItem(object sender, global::System.ComponentModel.PropertyChangedEventArgs e)
                {
                    TeamListPage_obj1_Bindings bindings = TryGetBindingObject();
                    if (bindings != null)
                    {
                        string propName = e.PropertyName;
                        global::DataAccessLibrary.Models.TeamModel obj = sender as global::DataAccessLibrary.Models.TeamModel;
                        if (global::System.String.IsNullOrEmpty(propName))
                        {
                        }
                        else
                        {
                            switch (propName)
                            {
                                default:
                                    break;
                            }
                        }
                    }
                }
                private global::DataAccessLibrary.Models.TeamModel cache_SelectedItem = null;
                public void UpdateChildListeners_SelectedItem(global::DataAccessLibrary.Models.TeamModel obj)
                {
                    if (obj != cache_SelectedItem)
                    {
                        if (cache_SelectedItem != null)
                        {
                            ((global::System.ComponentModel.INotifyPropertyChanged)cache_SelectedItem).PropertyChanged -= PropertyChanged_SelectedItem;
                            cache_SelectedItem = null;
                        }
                        if (obj != null)
                        {
                            cache_SelectedItem = obj;
                            ((global::System.ComponentModel.INotifyPropertyChanged)obj).PropertyChanged += PropertyChanged_SelectedItem;
                        }
                    }
                }
                public void RegisterTwoWayListener_4(global::Telerik.UI.Xaml.Controls.Grid.RadDataGrid sourceObject)
                {
                    sourceObject.RegisterPropertyChangedCallback(global::Telerik.UI.Xaml.Controls.Grid.RadDataGrid.SelectedItemProperty, (sender, prop) =>
                    {
                        var bindingObj = this.TryGetBindingObject();
                        if (bindingObj != null)
                        {
                            bindingObj.UpdateTwoWay_4_SelectedItem();
                        }
                    });
                }
            }
        }
        /// <summary>
        /// Connect()
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.19041.685")]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public void Connect(int connectionId, object target)
        {
            switch(connectionId)
            {
            case 2: // Views\TeamListPage.xaml line 20
                {
                    this.mainCommandBar = (global::Windows.UI.Xaml.Controls.CommandBar)(target);
                }
                break;
            case 3: // Views\TeamListPage.xaml line 37
                {
                    this.newRecordStackPanel = (global::Windows.UI.Xaml.Controls.StackPanel)(target);
                }
                break;
            case 4: // Views\TeamListPage.xaml line 51
                {
                    this.Datagrid = (global::Telerik.UI.Xaml.Controls.Grid.RadDataGrid)(target);
                }
                break;
            case 6: // Views\TeamListPage.xaml line 41
                {
                    this.golfclubDropDown = (global::Windows.UI.Xaml.Controls.ComboBox)(target);
                }
                break;
            case 7: // Views\TeamListPage.xaml line 42
                {
                    this.klasseDropDown = (global::Windows.UI.Xaml.Controls.ComboBox)(target);
                }
                break;
            case 8: // Views\TeamListPage.xaml line 43
                {
                    this.TeamNaamTextBox = (global::Windows.UI.Xaml.Controls.TextBox)(target);
                }
                break;
            case 9: // Views\TeamListPage.xaml line 48
                {
                    this.DeleteNewRecord = (global::Windows.UI.Xaml.Controls.AppBarButton)(target);
                    ((global::Windows.UI.Xaml.Controls.AppBarButton)this.DeleteNewRecord).Click += this.DeleteNewRecord_Click;
                }
                break;
            case 10: // Views\TeamListPage.xaml line 49
                {
                    this.SaveNewRecord = (global::Windows.UI.Xaml.Controls.AppBarButton)(target);
                    ((global::Windows.UI.Xaml.Controls.AppBarButton)this.SaveNewRecord).Click += this.SaveNewRecord_Click;
                }
                break;
            case 11: // Views\TeamListPage.xaml line 21
                {
                    global::Windows.UI.Xaml.Controls.AppBarButton element11 = (global::Windows.UI.Xaml.Controls.AppBarButton)(target);
                    ((global::Windows.UI.Xaml.Controls.AppBarButton)element11).Click += this.Insert_new_entry;
                }
                break;
            case 12: // Views\TeamListPage.xaml line 26
                {
                    global::Windows.UI.Xaml.Controls.AppBarButton element12 = (global::Windows.UI.Xaml.Controls.AppBarButton)(target);
                    ((global::Windows.UI.Xaml.Controls.AppBarButton)element12).Click += this.Delete_Click;
                }
                break;
            case 13: // Views\TeamListPage.xaml line 31
                {
                    global::Windows.UI.Xaml.Controls.AppBarButton element13 = (global::Windows.UI.Xaml.Controls.AppBarButton)(target);
                    ((global::Windows.UI.Xaml.Controls.AppBarButton)element13).Click += this.UpdateRecord_Click;
                }
                break;
            default:
                break;
            }
            this._contentLoaded = true;
        }

        /// <summary>
        /// GetBindingConnector(int connectionId, object target)
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.19041.685")]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public global::Windows.UI.Xaml.Markup.IComponentConnector GetBindingConnector(int connectionId, object target)
        {
            global::Windows.UI.Xaml.Markup.IComponentConnector returnValue = null;
            switch(connectionId)
            {
            case 1: // Views\TeamListPage.xaml line 1
                {                    
                    global::Windows.UI.Xaml.Controls.Page element1 = (global::Windows.UI.Xaml.Controls.Page)target;
                    TeamListPage_obj1_Bindings bindings = new TeamListPage_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;
        }
    }
}

