DataWindow – Quickly create basic windows in WPF

by Geert 3. December 2009 14:49

When developing software in WPF, I always need the following three types of windows:

  • OK / Cancel buttons for data windows;
  • OK / Cancel / Apply buttons for application settings / options;
  • Close button on windows for action windows.

Creating these windows is just boring and the steps are always the same:

  1. Create a WrapPanel at the bottom of the window
  2. Add the buttons with the same RoutedUICommand objects over and over again

The attached class makes it much easier to create these basic windows, simply by specifying the mode of the Window. By using this window, you can concentrate on the actual implementation and you don’t have to worry about the implementation of the buttons itself, which saves you time!

DataWindow demo

Using the class is very easy. Simply derive the Window class from DataWindow instead of Window. The demo application should give you enough information on how to proceed.

20091203 - DataWindow.zip (342.70 kb) [Downloads: 480]

kick it on DotNetKicks.com 

A simple DataWindow to easily add basic windows to your WPF application.

Tags:

C# | WPF

Pingbacks and trackbacks (1)+

Comments are closed

About the Author

Geert van Horrik is a independent freelance software developer since January 1st, 2007. Since then he was been working on several projects from C++ to C# (WPF, ASP.NET, etc). Currently he loves to write his software using WPF (or Silverlight if WPF isn't an option).

Lately, Geert is spending a lot of time on Catel, a free open-source MVVM Framework for WPF and Silverlight. Actually, it's more than "just" an MVVM Framework, it's a complete application library!