{"action":"created","issue":{"url":"https://api.github.com/repos/PrismLibrary/Prism/issues/426","labels_url":"https://api.github.com/repos/PrismLibrary/Prism/issues/426/labels{/name}","comments_url":"https://api.github.com/repos/PrismLibrary/Prism/issues/426/comments","events_url":"https://api.github.com/repos/PrismLibrary/Prism/issues/426/events","html_url":"https://github.com/PrismLibrary/Prism/issues/426","id":129120407,"number":426,"title":"PopupWindowAction locks up when invoked on minimized window","user":{"login":"dvorn","id":13989659,"avatar_url":"https://avatars.githubusercontent.com/u/13989659?v=3","gravatar_id":"","url":"https://api.github.com/users/dvorn","html_url":"https://github.com/dvorn","followers_url":"https://api.github.com/users/dvorn/followers","following_url":"https://api.github.com/users/dvorn/following{/other_user}","gists_url":"https://api.github.com/users/dvorn/gists{/gist_id}","starred_url":"https://api.github.com/users/dvorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvorn/subscriptions","organizations_url":"https://api.github.com/users/dvorn/orgs","repos_url":"https://api.github.com/users/dvorn/repos","events_url":"https://api.github.com/users/dvorn/events{/privacy}","received_events_url":"https://api.github.com/users/dvorn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-27T11:50:00Z","updated_at":"2016-01-27T15:24:16Z","closed_at":null,"body":"Steps to reproduce:\r\nIn InteractivityQuickstart sample, in InteractionRequestViewModel.cs, add namespace System.Threading.Tasks and modify RaiseNotification method the following way:\r\n\r\n        private async void RaiseNotification()\r\n        {\r\n            await Task.Delay(5000);\r\n\r\n            this.NotificationRequest.Raise(\r\n               new Notification { Content = \"Notification Message\", Title = \"Notification\" },\r\n               n => { InteractionResultMessage = \"The user was notified.\"; });\r\n        }\r\n\r\nThen run the sample.  After pressing Raise Default Notification button, the PopupWindowAction dialog pops up after 5 seconds delay.  If the program window is minimized after pressing the button in less than 5 seconds, the program locks up."},"comment":{"url":"https://api.github.com/repos/PrismLibrary/Prism/issues/comments/175687418","html_url":"https://github.com/PrismLibrary/Prism/issues/426#issuecomment-175687418","issue_url":"https://api.github.com/repos/PrismLibrary/Prism/issues/426","id":175687418,"user":{"login":"brianlagunas","id":835562,"avatar_url":"https://avatars.githubusercontent.com/u/835562?v=3","gravatar_id":"","url":"https://api.github.com/users/brianlagunas","html_url":"https://github.com/brianlagunas","followers_url":"https://api.github.com/users/brianlagunas/followers","following_url":"https://api.github.com/users/brianlagunas/following{/other_user}","gists_url":"https://api.github.com/users/brianlagunas/gists{/gist_id}","starred_url":"https://api.github.com/users/brianlagunas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianlagunas/subscriptions","organizations_url":"https://api.github.com/users/brianlagunas/orgs","repos_url":"https://api.github.com/users/brianlagunas/repos","events_url":"https://api.github.com/users/brianlagunas/events{/privacy}","received_events_url":"https://api.github.com/users/brianlagunas/received_events","type":"User","site_admin":false},"created_at":"2016-01-27T15:24:16Z","updated_at":"2016-01-27T15:24:16Z","body":"This seems to happen because of the logic that is invoked when setting CenterOverAssociatedObject=\"True\".  When setting this property, the PopupWindowAction hooks into the Window's SizeChanged event.  When the window is minimized the position of the AssociatedObject is {-31997,-31922}, which is obviously way off screen.  So when the position of the popup is calculated, it is being positioned way off screen in order to be centered around the hidden window.  So, technically the reason it appears to be locked is because it's a modal window that you can't activate because it is way off your monitor.\r\n\r\nI'm not sure how I will fix this.  Just because the position of the parent window is less than 0 doesn't mean it is off screen.  It could mean that it is simply on a different monitor, and depending on the DPI of the monitor, the negative values can be very large.\r\n\r\nIn the meantime you should use the WindowStartupLocation property instead.  Since, this scenario doesn't require the popup to be centered around a single element in a portion of the view."}}