public void ShowPopupScreenWindow(PopupScreenWindowViewModel dataContext) { PopupScreenWindow popup = new PopupScreenWindow() { DataContext = dataContext }; popup.CloseWindowCommand = new CommandModel(ClosePopupWindown); _popupScreenWindows.Add(popup); popup.Show(); }
public void ShowPopupWindow(PSW_ContentVO vo) { var titleBarHeight = 30d; PopupScreenWindow popup = new PopupScreenWindow(); ResourceDictionary resDimen = (ResourceDictionary)Application.LoadComponent(new Uri("/Pharmacy;component/Resources/Styles/Dimens.xaml", UriKind.Relative)); popup.Height = vo?.DesignHeight + titleBarHeight ?? (double)resDimen["DefaultPopupWindowHeight"]; popup.Width = vo?.DesignWidth ?? (double)resDimen["DefaultPopupWindowWidth"]; popup.MinHeight = popup.Height; popup.MinWidth = popup.Width; popup.DataContext = new PopupScreenWindowViewModel(vo); popup.CloseWindowCommand = new CommandModel(ClosePopupWindown); _popupScreenWindows.Add(popup); popup.Show(); }