Control-Level Modal Dialog

25 02 2009

In episode 115 of DNRTV, Billy Hollis shows off a great looking WPF application. It has a number of unique UI features, but one in particular which I loved was the control-level “modal dialog”.

Back at the time, I hacked up a class that would give me the same effect. I’ve had numerous requests for this code on StackOverflow, and I thought appropriate that I get the sample somewhere public. I’ve since integrated it into a product, and while I can’t release that updated source, I can release the original version.

This uses some code from Josh Smith’s Dragging Elements in Canvas CodeProject article

Download here! Note that you must rename the file from DialogPresenterzip.doc to DialogPresenter.zip (stupid limitation of WordPress).

An initial list of features that I wanted to add were:

  - Center the child window on the canvas
  - Add resizing capability
  - Add Dialog Templating
  - Add some styling (as you will see, the dialog looks ugly)

Enjoy!

About these ads

Actions

Information

3 responses

11 03 2009
Adrian Robson

This is great – just what I was looking for. Many thanks!

How did you solve the centre child window on the canvas? I’ve tried a few things but no luck yet.

Hope you can help…

17 06 2010
Adrian McGrath

Very nice and easily integrated.

Thanks for putting this out there….

3 08 2010
PopUp Dialog Behaviour « This Hours Eternity

[...] 2, 2010 Based on the StaffLynx application’s modal control-based popups and inspired by this post by Brad, I set about creating a PopUp Dialog Blend Behaviour and sample which I have put into the [...]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.

%d bloggers like this: