public void OpenWindows() { if (LayoutWindow != null) { LayoutWindow.Close(); } LayoutWindow = new Views.Layout(this); this._layoutWindow.layoutVM.Controler.XamlPage = (StackPanel)this.LayoutWindow.FindName("PageLayout"); if (SelectedPage != null) { this._layoutWindow.layoutVM.Controler.XamlPage = Settings.StringToXaml(this.SelectedPage.XamlPageString); } else if (SelectedMenu != null) { this._layoutWindow.layoutVM.Controler.XamlPage = Settings.StringToXaml(this.SelectedMenu.XamlPageString); } (this._layoutWindow.FindName("PageLayoutParent") as Grid).Children.Clear(); (this._layoutWindow.FindName("PageLayoutParent") as Grid).Children.Add(this._layoutWindow.layoutVM.Controler.XamlPage); ControlsWindow = new Views.Controls(this); PropertWindow = new Views.Property(this); if (!LayoutWindow.IsVisible) { LayoutWindow.Show(); } ControlsWindow.Hide(); PropertWindow.Hide(); if (LayoutWindow.IsVisible) { LayoutWindow.Activate(); } }
public void AddNewMenu(object obj) { Base.Menu newMenu = new Base.Menu(); LayoutWindow = new Views.Layout(this); newMenu.SiteId = SelectedSite.SiteId; newMenu.XamlPageString = Settings.XamlToSring((StackPanel)LayoutWindow.FindName("PageLayout")); AddWindow add = new AddWindow(newMenu, Consumer, this); add.Show(); }
private void LayoutControl_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { Views.Layout layoutView = (Views.Layout)Window.GetWindow(this); layoutView.layoutVM.LayoutControl_MouseLeftButtonDown(sender); }