コード例 #1
0
        public PopupScreenWindowViewModel(PSW_ContentVO contentVO)
        {
            _psw_ContentVO = contentVO;

            if (contentVO?.Content is Uri)
            {
                CurrentPageSource = contentVO?.Content as Uri;
            }
            else
            {
                Content = contentVO.Content;
            }

            PageLoadingDelayTime = contentVO?.ContentLoadingDelayTime ?? 0;
        }
コード例 #2
0
        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();
        }