Esempio n. 1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this._CheckBoxButton = ((TecCargo_Faktura.Controls.CheckBoxButton)(target));

            #line 7 "..\..\..\Controls\CheckBoxButton.xaml"
                this._CheckBoxButton.Loaded += new System.Windows.RoutedEventHandler(this._CheckBoxButton_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this._Button = ((System.Windows.Controls.Button)(target));
                return;

            case 3:
                this._Image = ((System.Windows.Controls.Image)(target));
                return;

            case 4:
                this.InputText = ((System.Windows.Controls.Label)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 2
0
        /// <summary>
        ///
        /// </summary>
        private void SetSelectionStatus(int statusId, CheckBoxButton senderButton = null)
        {
            bool buttoncheckStatus = false;

            switch (statusId)
            {
            case id_ShowAllAndCheck:
                ItemsIsShow = true;    //sig at items er vis
                break;

            default:
                ItemsIsShow = false;    //sig at items er vis
                break;
            }

            //hvis der ikke er sat nogen knap tjek om der en der er checked
            if (senderButton == null)
            {
                foreach (CheckBoxButton item in _ItemsContains.Children)
                {
                    if (item.Checked)
                    {
                        senderButton = item;
                        break;
                    }
                }
            }

            //hvis der en knap hent check status
            if (senderButton != null)
            {
                buttoncheckStatus = senderButton.Checked;
            }
            int loopRun = _ItemsContains.Children.Count;


            //tjek om der er en der er checked
            for (int i = 0; i < _ItemsContains.Children.Count; i++)
            {
                CheckBoxButton buttonItem = _ItemsContains.Children[i] as CheckBoxButton;
                buttonItem.Checked = false;

                if (id_HideAll != statusId)
                {
                    buttonItem.Visibility = Visibility.Visible;
                }
                else
                {
                    buttonItem.Visibility = Visibility.Collapsed;
                }
                //buttonItem.Visibility = Visibility.Collapsed;
            }

            //om den stadig skal være checked
            if (senderButton != null)
            {
                senderButton.Visibility = Visibility.Visible;
                senderButton.Checked    = buttoncheckStatus;
            }
        }
Esempio n. 3
0
        /// <summary>
        /// når man klikker på en item/checkbox
        /// skal den hakke valgte af og
        /// skjule/visse de andre valgt
        /// </summary>
        private void _newItemButton_Click(object sender, RoutedEventArgs e)
        {
            CheckBoxButton senderItemButton = sender as CheckBoxButton;
            int            itemCount        = _ItemsContains.Children.Count;// hvormange checkboxbutton/items der er
            bool           checkStatus      = senderItemButton.Checked;

            //MessageBox.Show(senderItemButton.Text + " " + checkStatus);

            //hvis checkboxbutton er hakket af og
            //de andre items checkboxbutton er skjul
            //skal den vise alle items
            if (!senderItemButton.Checked && !ItemsIsShow)
            {
                senderItemButton.Checked = true; //gør så den stadig er hakket af

                SetSelectionStatus(id_ShowAllAndCheck, senderItemButton);
            }
            //skjul alle items når den er hakket af
            else if (senderItemButton.Checked)
            {
                SetSelectionStatus(id_HideAll, senderItemButton);
            }
            else
            {
                SetSelectionStatus(id_ShowAll, senderItemButton);
            }

            _SelectionChanged_Event(); //sig der er sket ændringere
        }
Esempio n. 4
0
        /// <summary>
        /// Opret header alt efter om det
        /// er en checkbox eller label
        /// </summary>
        private void MakeHeader()
        {
            //IsUnLock binding
            Binding IsEnabledBind = new Binding("IsUnLock");

            IsEnabledBind.ElementName = "_Address";
            IsEnabledBind.Mode        = BindingMode.OneWay;

            if (this.HeaderIsCheckButton)
            {
                CheckBoxButton headerItem = new CheckBoxButton();
                headerItem.Text                = this.Header;
                headerItem.FontWeight          = FontWeights.Bold;
                headerItem.VerticalAlignment   = VerticalAlignment.Top;
                headerItem.HorizontalAlignment = HorizontalAlignment.Left;
                headerItem.Height              = 45;
                headerItem.Checked             = CheckedHeader;
                headerItem.Click              += headerItem_Click;
                headerItem.SetBinding(IsEnabledProperty, IsEnabledBind);

                Grid.SetRow(headerItem, 0);
                Grid_Contain.Children.Add(headerItem);

                headerItem_Click(headerItem, new RoutedEventArgs());
            }
            else
            {
                Label headerItem = new Label();
                headerItem.Content             = this.Header;
                headerItem.FontWeight          = FontWeights.Bold;
                headerItem.FontSize            = 20;
                headerItem.VerticalAlignment   = VerticalAlignment.Top;
                headerItem.HorizontalAlignment = HorizontalAlignment.Left;
                headerItem.Height = 45;
                headerItem.SetBinding(IsEnabledProperty, IsEnabledBind);
                Grid.SetRow(headerItem, 0);
                Grid_Contain.Children.Add(headerItem);
            }
        }
Esempio n. 5
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this._Gebyr = ((TecCargo_Faktura.Controls.Gebyr)(target));
                return;

            case 2:
                this.CheckBoxButton_Gebyr_0 = ((TecCargo_Faktura.Controls.CheckBoxButton)(target));
                return;

            case 3:
                this.CheckBoxButton_Gebyr_1 = ((TecCargo_Faktura.Controls.CheckBoxButton)(target));
                return;

            case 4:
                this.CheckBoxButton_Gebyr_2 = ((TecCargo_Faktura.Controls.CheckBoxButton)(target));
                return;

            case 5:
                this.CheckBoxButton_Gebyr_3 = ((TecCargo_Faktura.Controls.CheckBoxButton)(target));
                return;

            case 6:
                this.CheckBoxButton_Gebyr_4 = ((TecCargo_Faktura.Controls.CheckBoxButton)(target));
                return;

            case 7:
                this.CheckBoxButton_Gebyr_5 = ((TecCargo_Faktura.Controls.CheckBoxButton)(target));
                return;

            case 8:
                this.CheckBoxButton_Gebyr_6 = ((TecCargo_Faktura.Controls.CheckBoxButton)(target));
                return;

            case 9:
                this.CheckBoxButton_Gebyr_7 = ((TecCargo_Faktura.Controls.CheckBoxButton)(target));
                return;

            case 10:
                this.CheckBoxButton_Gebyr_8 = ((TecCargo_Faktura.Controls.CheckBoxButton)(target));
                return;

            case 11:
                this.CheckBoxButton_Gebyr_9 = ((TecCargo_Faktura.Controls.CheckBoxButton)(target));
                return;

            case 12:
                this.CheckBoxButton_Gebyr_10 = ((TecCargo_Faktura.Controls.CheckBoxButton)(target));
                return;

            case 13:
                this.CheckBoxButton_Gebyr_11 = ((TecCargo_Faktura.Controls.CheckBoxButton)(target));
                return;

            case 14:
                this.MyTextbox_Gebyr_0 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 15:
                this.MyTextbox_Gebyr_1 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 16:
                this.MyTextbox_Gebyr_6 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 17:
                this.MyTextbox_Gebyr_7 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 18:
                this.MyTextbox_Gebyr_9 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 19:
                this.MyTextbox_Gebyr_10 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 20:
                this.MyTextbox_Gebyr_11 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 6
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this._UserPanel = ((TecCargo_Faktura.WindowsView.UserPanel)(target));
                return;

            case 2:
                this.ScrollViewBox = ((System.Windows.Controls.ScrollViewer)(target));

            #line 31 "..\..\..\WindowsView\UserPanel.xaml"
                this.ScrollViewBox.ScrollChanged += new System.Windows.Controls.ScrollChangedEventHandler(this.ScrollViewBox_ScrollChanged);

            #line default
            #line hidden
                return;

            case 3:
                this.Grid_Viewbox = ((System.Windows.Controls.Grid)(target));
                return;

            case 4:
                this.Address_Afsender = ((TecCargo_Faktura.Controls.Address)(target));
                return;

            case 5:
                this.Address_Modtager = ((TecCargo_Faktura.Controls.Address)(target));
                return;

            case 6:
                this.Address_Modtager2 = ((TecCargo_Faktura.Controls.Address)(target));
                return;

            case 7:
                this.MyTextbox_Generelt_Reference = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 8:
                this.MyTextbox_Generelt_Fragtmand = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 9:
                this.DateTimePicker_Generelt_Rute_1 = ((TecCargo_Faktura.Controls.DateTimePicker)(target));
                return;

            case 10:
                this.MyTextbox_Generelt_Rute_1 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 11:
                this.DateTimePicker_Generelt_Rute_2 = ((TecCargo_Faktura.Controls.DateTimePicker)(target));
                return;

            case 12:
                this.MyTextbox_Generelt_Rute_2 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 13:
                this.Selector_Generelt_Forsikringstype = ((TecCargo_Faktura.Controls.Selector)(target));
                return;

            case 14:
                this.CheckBoxButton_Byttepaller = ((TecCargo_Faktura.Controls.CheckBoxButton)(target));
                return;

            case 15:
                this.MyTextbox_Byttepaller_1 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 16:
                this.MyTextbox_Byttepaller_2 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 17:
                this.MyTextbox_Byttepaller_3 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 18:
                this.CheckBoxButton_Efterkrav = ((TecCargo_Faktura.Controls.CheckBoxButton)(target));
                return;

            case 19:
                this.MyTextbox_Efterkrav_1 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 20:
                this.MyTextbox_Efterkrav_2 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 21:
                this.MyTextbox_Efterkrav_3 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 22:
                this.MyTextbox_Efterkrav_4 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 23:
                this.Selector_Transport1 = ((TecCargo_Faktura.Controls.Selector)(target));
                return;

            case 24:
                this.Selector_Transport2 = ((TecCargo_Faktura.Controls.Selector)(target));
                return;

            case 25:
                this.Selector_Transport3 = ((TecCargo_Faktura.Controls.Selector)(target));
                return;

            case 26:
                this.PakkeControl_Transport = ((TecCargo_Faktura.Controls.PakkeControl)(target));
                return;

            case 27:
                this.MyTextBlock_Notifications = ((TecCargo_Faktura.Controls.MyTextBlock)(target));
                return;

            case 28:
                this.Grid_CheckStatusContainer = ((System.Windows.Controls.Grid)(target));

            #line 187 "..\..\..\WindowsView\UserPanel.xaml"
                this.Grid_CheckStatusContainer.IsVisibleChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.Grid_StatusCheck_IsVisibleChanged);

            #line default
            #line hidden
                return;

            case 29:

            #line 194 "..\..\..\WindowsView\UserPanel.xaml"
                ((System.Windows.Controls.Grid)(target)).IsVisibleChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.Grid_PDFView_IsVisibleChanged);

            #line default
            #line hidden
                return;

            case 30:
                this.MyDocumentViewer_PDFViewer = ((TecCargo_Faktura.Controls.MyDocumentViewer)(target));
                return;

            case 31:
                this.DateTimePicker_Afslut_Leveringsdato = ((TecCargo_Faktura.Controls.DateTimePicker)(target));
                return;

            case 32:
                this.MyTextbox_Afslut_Rabat = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 33:
                this.MyTextbox_Afslut_Kilometer = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 34:
                this.MyTextbox_Afslut_Tidsforbrug_1 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 35:
                this.MyTextbox_Afslut_Tidsforbrug_2 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 36:
                this.MyTextbox_Afslut_Tidsforbrug_3 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 37:
                this.MyTextbox_Afslut_Tidsforbrug_4 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 38:
                this.MyTextBlock_Afslut_Kommentar = ((TecCargo_Faktura.Controls.MyTextBlock)(target));
                return;

            case 39:
                this.Address_Faktura = ((TecCargo_Faktura.Controls.Address)(target));
                return;

            case 40:
                this.Gebyr_Ekstra = ((TecCargo_Faktura.Controls.Gebyr)(target));
                return;

            case 41:
                this.Button_GridViewBack = ((System.Windows.Controls.Button)(target));

            #line 318 "..\..\..\WindowsView\UserPanel.xaml"
                this.Button_GridViewBack.Click += new System.Windows.RoutedEventHandler(this.Button_ViewSelectorChangeView_Click);

            #line default
            #line hidden
                return;

            case 42:
                this.Button_GridViewNext = ((System.Windows.Controls.Button)(target));

            #line 333 "..\..\..\WindowsView\UserPanel.xaml"
                this.Button_GridViewNext.Click += new System.Windows.RoutedEventHandler(this.Button_ViewSelectorChangeView_Click);

            #line default
            #line hidden
                return;

            case 43:
                this.Prislist_faktura = ((TecCargo_Faktura.Controls.PrisList)(target));
                return;

            case 44:
                this.Image_ButtomStatusFragt = ((System.Windows.Controls.Image)(target));
                return;

            case 45:
                this.Image_ButtomStatusFaktura = ((System.Windows.Controls.Image)(target));
                return;

            case 46:

            #line 418 "..\..\..\WindowsView\UserPanel.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ToolsbarButton_Filer_Click);

            #line default
            #line hidden
                return;

            case 47:

            #line 419 "..\..\..\WindowsView\UserPanel.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonAdmin_Startmenu_Click);

            #line default
            #line hidden
                return;

            case 48:
                this.Button_Save = ((System.Windows.Controls.Button)(target));

            #line 428 "..\..\..\WindowsView\UserPanel.xaml"
                this.Button_Save.Click += new System.Windows.RoutedEventHandler(this.toolbarButton_save_Click);

            #line default
            #line hidden
                return;

            case 49:

            #line 432 "..\..\..\WindowsView\UserPanel.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.toolbarButton_PDF_Click);

            #line default
            #line hidden
                return;

            case 50:

            #line 436 "..\..\..\WindowsView\UserPanel.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.toolbarButton_new_Click);

            #line default
            #line hidden
                return;

            case 51:

            #line 449 "..\..\..\WindowsView\UserPanel.xaml"
                ((System.Windows.Controls.Primitives.ToggleButton)(target)).Click += new System.Windows.RoutedEventHandler(this.ToolBarButton_Test);

            #line default
            #line hidden
                return;

            case 52:

            #line 453 "..\..\..\WindowsView\UserPanel.xaml"
                ((System.Windows.Controls.Primitives.ToggleButton)(target)).Click += new System.Windows.RoutedEventHandler(this.ToolBarButton_Test);

            #line default
            #line hidden
                return;

            case 53:

            #line 457 "..\..\..\WindowsView\UserPanel.xaml"
                ((System.Windows.Controls.Primitives.ToggleButton)(target)).Click += new System.Windows.RoutedEventHandler(this.ToolBarButton_Test);

            #line default
            #line hidden
                return;

            case 54:
                this.Slider_Zoom = ((System.Windows.Controls.Slider)(target));

            #line 470 "..\..\..\WindowsView\UserPanel.xaml"
                this.Slider_Zoom.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.Slider_ValueChanged);

            #line default
            #line hidden
                return;

            case 55:

            #line 482 "..\..\..\WindowsView\UserPanel.xaml"
                ((System.Windows.Controls.Primitives.ToggleButton)(target)).Click += new System.Windows.RoutedEventHandler(this.ToolBarButton_ChangeOptions_Click);

            #line default
            #line hidden
                return;

            case 56:

            #line 486 "..\..\..\WindowsView\UserPanel.xaml"
                ((System.Windows.Controls.Primitives.ToggleButton)(target)).Click += new System.Windows.RoutedEventHandler(this.ToolBarButton_ChangeOptions_Click);

            #line default
            #line hidden
                return;

            case 57:

            #line 490 "..\..\..\WindowsView\UserPanel.xaml"
                ((System.Windows.Controls.Primitives.ToggleButton)(target)).Click += new System.Windows.RoutedEventHandler(this.ToolBarButton_ChangeOptions_Click);

            #line default
            #line hidden
                return;

            case 58:
                this.Line_ViewSelector_FragtFirstH = ((System.Windows.Shapes.Line)(target));
                return;

            case 59:
                this.TextBlock_ViewSelector_Fragt = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 60:
                this.Line_ViewSelector_FragtLastH = ((System.Windows.Shapes.Line)(target));
                return;

            case 61:
                this.Line_ViewSelector_FakturaFirstH = ((System.Windows.Shapes.Line)(target));
                return;

            case 62:
                this.TextBlock_ViewSelector_Faktura = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 63:
                this.Line_ViewSelector_FakturaLastH = ((System.Windows.Shapes.Line)(target));
                return;

            case 64:
                this.Border_ViewSelectorBox = ((System.Windows.Controls.Border)(target));
                return;

            case 65:
                this.Button_ViewSelectorBack = ((System.Windows.Controls.Button)(target));

            #line 557 "..\..\..\WindowsView\UserPanel.xaml"
                this.Button_ViewSelectorBack.Click += new System.Windows.RoutedEventHandler(this.Button_ViewSelectorChangeView_Click);

            #line default
            #line hidden
                return;

            case 66:
                this.Border_ViewSelector = ((System.Windows.Controls.Border)(target));
                return;

            case 67:
                this.Grid_ViewSelectorContainer = ((System.Windows.Controls.Grid)(target));
                return;

            case 68:
                this.Button_ViewSelectorNext = ((System.Windows.Controls.Button)(target));

            #line 582 "..\..\..\WindowsView\UserPanel.xaml"
                this.Button_ViewSelectorNext.Click += new System.Windows.RoutedEventHandler(this.Button_ViewSelectorChangeView_Click);

            #line default
            #line hidden
                return;

            case 69:
                this.ToolsbarMenu_Filer = ((System.Windows.Controls.ListBox)(target));
                return;

            case 70:
                this.toolbarButtonListSave = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 71:
                this.toolbarList_PDF = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 72:
                this.ButtonTool_CloseFragtbrev = ((System.Windows.Controls.Button)(target));
                return;

            case 73:
                this.ButtonTool_CloseFragtbrevComment = ((System.Windows.Controls.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 7
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this._Address = ((TecCargo_Faktura.Controls.Address)(target));

            #line 8 "..\..\..\Controls\Address.xaml"
                this._Address.Loaded += new System.Windows.RoutedEventHandler(this._Address_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.Grid_Contain = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.Textbox_ContactTlf = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 4:
                this.Textbox_FirmName = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 5:
                this.Textbox_ContactPer = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 6:
                this.Textbox_Address = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 7:
                this.Textbox_ZipCode = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 8:
                this.TextBlock_City = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 9:
                this.CheckBox_Pay = ((TecCargo_Faktura.Controls.CheckBoxButton)(target));
                return;

            case 10:
                this.ListBox_Customer = ((System.Windows.Controls.ListView)(target));

            #line 34 "..\..\..\Controls\Address.xaml"
                this.ListBox_Customer.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.ListBox_Customer_GetInfoData);

            #line default
            #line hidden

            #line 35 "..\..\..\Controls\Address.xaml"
                this.ListBox_Customer.KeyDown += new System.Windows.Input.KeyEventHandler(this.ListBox_Customer_GetInfoData);

            #line default
            #line hidden

            #line 35 "..\..\..\Controls\Address.xaml"
                this.ListBox_Customer.IsVisibleChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.ListBox_Customer_IsVisibleChanged);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 8
0
        /// <summary>
        /// opdatere item list
        /// </summary>
        public void Update()
        {
            int oldSelectId = this.SelectId;

            //nulstil grid
            _ItemsContains.Children.Clear();
            _ItemsContains.RowDefinitions.Clear();
            _ItemsContains.ColumnDefinitions.Clear();

            int itemCount = Items.Count;
            int rowId     = 0;
            int columnId  = 0;

            double ColumnCount = Math.Ceiling((double)itemCount / MaxRow);

            //opret rækker
            for (int i = 0; i < MaxRow || (MaxRow == -1 && i < itemCount); i++)
            {
                _ItemsContains.RowDefinitions.Add(new RowDefinition());
                _ItemsContains.RowDefinitions[i].Height = GridLength.Auto;
            }

            //opret kolonner
            for (int i = 0; i < ColumnCount; i++)
            {
                _ItemsContains.ColumnDefinitions.Add(new ColumnDefinition());
                _ItemsContains.ColumnDefinitions[i].Width = GridLength.Auto;
            }
            //opret select knapper
            for (int i = 0; i < itemCount; i++)
            {
                CheckBoxButton newItemButton = new CheckBoxButton();


                newItemButton.Text      = Items[i];
                newItemButton.Margin    = new Thickness(10, 0, 0, 0);
                newItemButton.Width     = Width;
                newItemButton.Click    += _newItemButton_Click;
                newItemButton.ImageSize = 25;
                newItemButton.TextSize  = 15;

                if (oldSelectId == i)
                {
                    newItemButton.Checked = true;
                }

                if (MaxRow != -1 && rowId == MaxRow)
                {
                    rowId = 0;
                    columnId++;
                }

                Grid.SetRow(newItemButton, rowId);
                Grid.SetColumn(newItemButton, columnId);
                _ItemsContains.Children.Add(newItemButton);

                rowId++;
            }

            this.SelectId = oldSelectId;
        }