How to open a nonmodal child dialog that gets focused again when parent is refocused - winforms

I work on an MDI application where all Forms are opened as separate tabs.
I would like to open a dialog (non-modal) from one tabbed form which then sticks with this form.
I would like to have the dialog hide when another tab (form) is navigated to. But as soon as I navigate back to the form which opened the dialog, the dialog should be still visible as well.
Do I have to do this by hand? If I just show the dialog form like
form.Show(this)
where "this" is the parent form, the dialog just goes to the background when navigating away and is not focused again when navigating to the parent.

Related

Opening a modal window on navigation change or closing a window

So I'm looking to have my app open a modal popup window if a user tries to navigate away from a page or close the tab/browser with unsaved data on a form.
I've had people tell me this isn't possible as angular makes asynchronous callbacks and as such once you stop the event in order to open the modal and prevent the navigation the contents of the event are lost.
Is it possible to store the contents of the event in an object?

AngularJS nested modal templates

I have a spa developed with AngularJS (routing with ngroute). Every template have the menu, in the menu there is a back button. I want to return to the previous view with he's state (information, scroll in the page etc). If I code every button in the menu to open the next template in modal that have dimension of full screen, and the back button just close the current modal. This method can do a memory leak?
This case is an hybrid application running in the tablet, the back button is in the menu of application not that of the browser.
Why don't you use $window.history.back();
Why don't you create a template for the menu and include it into your views by using ng-include?

How to show a WPF modal window over a WPF popup?

I have a WPF app where I make my screen dark and show the user a popup for him to fill in some data.
One of the controls hosted in that popup might raise a modal window asking the user to confirm some validation results, when that modal is raised it doesn't show because the popup takes precedence in the UI.
Is there a way to force the modal be shown over the popup?

Silverlight - Open dropdown only clicking on Toggle button

Can anybody tell me how I can open popup by clicking only on Toggle button. Usually, combobox opens popup when you click anywhere. In our project we need to open popup only when user clicks on Toggle button. It's kinda urgent.
One approach would be to create a custom control. This would give you more control over all the parts that make up your combobox. http://blogs.msdn.com/b/sburke/archive/2008/03/22/tutorial-writing-a-templated-silverlight-2-control.aspx

Hide wpf popup when click on a Winform control

I have an ElementHost object in a WinForm dialog.
This elementhosts child is a Popup.
I want to hide or close the Popup when the user clicks anywhere. I can do it when the click happened in the Popup. How to close it when the user clicks outside the popup, on a WinForm control?
Did you try StaysOpen=false?

Resources