views:

120

answers:

2

I am building an application which has multiple user entry screens. I would like to know if there are advantages/disadvantages of using wpf popups rather than modal windows? I am using mvvm-light.

I have noticed that popups are being used extensively in touch applications (eg iPad).

+1  A: 

The issue is really one of Desktop vs. Web applications. Popups in Silverlight (or other touch apps) involve having only one real window to work with (the mobile surface, or the web browser). If you are writing a desktop app, then modal windows will probably match user expectations better as Popups cannot leave the parent window.

Steve Mitcham
Actually in both WPF and Silverlight a Popup **can** leave the parent window. This makes it different from an Adorner, which can't. Of course if you're running in a web browser or a mobile surface without a concept of windows, then by definition nothing can leave the window. It seems to me the questioner is asking about two technologies, Popups and modal Windows, both of which are capable of appearing outside the parent window, but which differ in other ways.
Ray Burns
A: 

pop ups are nice but are very difficult to control. In our apps we are using adorners to be 'pop-up' editors - we have created a control that can hold any other control and display it in the adorner layer of the main window. This allows to do things such as having 1 control appear next to another yet still have the other control in use or we can grey out the background and force focus to the new control and not allow any other control to be used until the 'ok' button is pressed. If you Google for adorners in wpf you will find a lot of excellent articles.

Leom Burke
I'll look into how wpf adorners are used. I am interested in developing applications that do not look like traditional winforms. Have you mainly replaced the use of modal windows in your applications with adorners or are you only using them in specific situations?
Shatterling
We are using as a sort of modal window - it certainly does not look like a winforms app. We place a single control in them (such as an address editor)
Leom Burke