public void AgregarElementoMenu(_sis_Contenedor contenedor) { ElementoMenu elemento = new ElementoMenu(); elemento.Contenedor = contenedor; elemento.Height = AltoElementoMenu; elemento.Width = AnchoElementoMenu; elemento.Indice = elementos.Count; elemento.clickElementoMenu += elemento_clickElementoMenu; elemento.clickElementoMenuOpcion += elemento_clickElementoMenuOpcion; if (contenedor.STitulo == null) { elemento.Visibility = System.Windows.Visibility.Hidden; } elementos.Add(elemento); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.UserControl = ((InterfazWPF.ElementoMenu)(target)); return; case 2: this.OnMouseUp1_BeginStoryboard = ((System.Windows.Media.Animation.BeginStoryboard)(target)); return; case 3: this.LayoutRoot = ((System.Windows.Controls.Grid)(target)); return; case 4: this.rectangle = ((System.Windows.Shapes.Rectangle)(target)); return; case 5: this.rectangle1 = ((System.Windows.Shapes.Rectangle)(target)); return; case 6: this.img_imagenIcono = ((System.Windows.Controls.Image)(target)); return; case 7: this.img_imagenIcono_reflejo = ((System.Windows.Controls.Image)(target)); return; case 8: this.txt_titulo = ((System.Windows.Controls.TextBlock)(target)); return; case 9: this.contenedorOpcionesElementoMenu = ((InterfazWPF.ContenedorOpcionesElementoMenu)(target)); return; } this._contentLoaded = true; }