WPF: The Lost Controls
WPF is a nice GUI framework, but it lacks some common functions and controls. I needed them, so I created them, and here I share them with you. The controls and control-related classes I have included are:
-
CursorDuringCall
Place this inside a using() block to reliably manage the wait cursor state. -
EditableLabel
Double click this label to get a text box. -
FitStackPanel
Combine a StackPanel's ease with a Grid's versatility, and you nearly have FitStackPanel. It supports Auto, Pixel (fixed-size), and Star resizing, as well as a new type, Shrinkable, which acts like Auto unless MinHeight is set and there is not enough room. -
InputBox
Easily show dialog boxes with text, check and combo box fields - a more powerful version of the Visual Basic 6 InputBox function. -
SwitcherItemsControl
Pass a list of items, and it will only show the selected one. Unlike a tab control, it will only hide unselected items instead of unloading them. -
ThumbnailPanel
Like a WrapPanel, but for fixed-size images and virtualized (loading as-needed). -
WindowMemory
Put WindowState, Height, Width, Left, and Top in your Settings, and then set attached properties WindowMemory.Prefix and WindowMemory.Source on your window. The window will thereafter remember its location between program startups.
There are also classes for registering file type associations and for making a program start with Windows, and a number of very useful converters.
WPF: The Lost Controls's license is Zlib-style.