public static void PropertiesVertexWindow(Vertex vertex)
        {
            VertexProperty propertyWindow = new VertexProperty();

            propertyWindow.nameVertex.Tag = vertex;

            propertyWindow.nameVertex.Text = (vertex.Text == "") ? vertex.Index.ToString() : vertex.Text;

            propertyWindow.nameVertex.TextChanged += NameVertex_TextChanged;

            foreach (var color in Globals.Colors)
            {
                Button newButton = new Button
                {
                    Height     = 18,
                    Width      = 18,
                    Background = color,
                    Tag        = vertex,
                    Margin     = new Thickness(2.5)
                };

                newButton.Click += ChangeColorVertex;

                propertyWindow.colorBar.Items.Add(newButton);
            }

            propertyWindow.ShowDialog();
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.myWindow = ((Graph_Editor.PropertiesWindow.VertexProperty)(target));
                return;

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

            case 3:
                this.nameVertex = ((System.Windows.Controls.TextBox)(target));
                return;

            case 4:
                this.labeName = ((System.Windows.Controls.Label)(target));
                return;

            case 5:
                this.colorBar = ((System.Windows.Controls.ToolBar)(target));
                return;

            case 6:
                this.labelColor = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.buttonClose = ((System.Windows.Controls.Button)(target));

            #line 14 "..\..\..\PropertiesWindow\VertexProperty.xaml"
                this.buttonClose.Click += new System.Windows.RoutedEventHandler(this.ButtonClose_Click);

            #line default
            #line hidden
                return;

            case 8:
                this.logo = ((System.Windows.Controls.Image)(target));
                return;
            }
            this._contentLoaded = true;
        }