public void SetWindowExternal(Type curType, string presenterName) { ModuleSubmenu ms = new ModuleSubmenu { Module = this.Model.Modules[0], PresenterType = curType, Name = presenterName }; SetWindow(ms); }
public void SetWindow(ModuleSubmenu ms) { InternalWindow window = new InternalWindow(); window.Parent = this.content.WindowsContainer as Panel; window.CanResize = true; window.ShowStatusBar = false; window.Header = ms.Name; window.StartPosition = ToolWindowStartPosition.CenterParent; window.Height = SystemParameters.FullPrimaryScreenHeight - 150; window.Width = SystemParameters.FullPrimaryScreenWidth - 10; window.Icon = new BitmapImage(new Uri(ms.IconPath, UriKind.Relative)); //window.Width = 800; //window.Icon = Util.GetImageSource(ms.Image); window.GridContent.Children.Add((UserControlBase)ms.Module.Execute(ms.PresenterType, window)); window.Show(); }
private void ImageButton_Click(object sender, RoutedEventArgs e) { ModuleSubmenu ms = ((ImageButton)sender).CommandParameter as ModuleSubmenu; SetWindow(ms); }
private void DropDownMenuItem_Click(object sender, RoutedEventArgs e) { ModuleSubmenu ms = ((HeaderedItemsControl)e.OriginalSource).Header as ModuleSubmenu; //((DropDownMenuItem)sender).Items[ ((DropDownMenuItem)sender).Items.CurrentPosition] as ModuleSubmenu; SetWindow(ms); }