I have a WPF Window which has a among other controls hosts a Frame. In that frame I display different pages. Is there way to make a dialog modal to only a page? When I'm showing the dialog it should not be possible to click on any control on the page but it should be possible to click on a control on the same window that is not on the page.
Wpf – How to make modal dialog for a Page in the WPF-application
modal-dialogwpf
Related Topic
- WPF Modal Window using ShowDialog() Blocks All Other Windows
- Wpf – How to build a generic/re-usable modal dialog for WPF following MVVM
- Jquery – Twitter bootstrap remote modal shows same content every time
- WPF Open a Modal window from UserControl
- Jquery – Close Bootstrap Modal
- Javascript – How to display a modal dialog in Redux that performs asynchronous actions
Best Answer
If I am correct in interpreting your message, you want something that works similar to what Billy Hollis demonstrates in his StaffLynx application.
I recently built a similar control and it turns out that this sort of idea is relatively simple to implement in WPF. I created a custom control called DialogPresenter. In the control template for the custom control, I added markup similar to the following:
I also added a
Show(Control view)
method, which finds the the 'PART_DialogView', and adds the passed in view to theContent
property.This then allows me to use the
DialogPresenter
as follows:To the buttons event handler (or bound command), I simply call the Show() method of the
DialogPresenter
.You can also easily add ScaleTransform markup to the DialogPresenter template to get scaling effects shown in the video. This solution has neat and tidy custom control code, and a very simple interface for your UI programming team.
Hope this helps!