The MM Toolkit for Silverlight is a composition of handy controls. It supports the MVVM pattern by using commands and bindings as well as events.
The MM Toolkit for Silverlight is a composition of controls I feel are missing from the Silverlight 5 SDK. Right now, the only controls in the toolkit are a DateTime picker control and a Search box control. But I will add more controls when I feel they are
ready for an initial publish, as there are more controls on my drawing board.
The DateTimeBox is a control that holds both date and time. You can select and change both without having to operate with two different controls. It supports the MVVM pattern by using commands and bindings as well as events. VisualStates makes the control look
and feel like a standard Silverlight control.
Here is the DateTimeBox in its focused state. The buttons to the right in the control ("choose date", "choose time" and "step date or time up or down") can be hidden at any time.
Note that the date format follows the CurrentCulture settings as default
Here is the date picker part, choosing the date from the built-in Silverlight 5 calendar control.
Here is the time picker part, choosing the time (by halv hours) from a standard dropdown control.
You can of course also write any date or time directly to the control. You can also set the format for the date and time.
The SearchBox is a control in which you can do a search (like asynchronous service calls), and the control waits to display the result, created for searches in huge sources. You don't have to pre-load lots of values in the client. The control has a SearchText
property which contains the text to search from. When pressing <enter> or waiting the threshold time (default 2 seconds), an event and a command (use which you like) will fire. The actual search is handled by you, and the result is put to the ItemsSource
so it can be viewe in the control.
The Searchbox control also has a SelectedItem which holds the selected item.
Here is the SearchBox in its focused state. You can start searching by start writing text, or pressing the arrow button to expand the search panel.
Here is the control in its search state. You write your text in the search box and press <enter> or wait default 2 seconds, and the search will start.
The SearchBox has three available templates:
The ItemTemplate is the template available for the items in the search part, showing the result as a vertical list. The ItemTemplate will apply for each item.
The ContentTemplate is the corresponding template for showing the selected item in the control, to the left of the arrow button.
This is the template for the content when the SelectedItem is null. You can show some default text or whatever you like.