A collection of useful behaviors, commands and converters which might be essential for MVVM apps.
OpenFlyoutAction
BindKeyToCommandBehavior
: a behavior that executes a given command if a certain key is pressedFocusTextboxBehavior
: a behavior that sets the focus to the attachedTextBox
after the Loaded event is firedSelectionModeBehavior
: emulates aIsSelectionEnabled
property forListView
sUpdateSelectedItemsBehavior
: a behavior that automatically synchronises selected items ofListView
s to a given List (inside the ViewModel)ProgressIndicatorBehavior
: a behavior which makes the ProgressIndicator accessible through XAML (Windows Phone only)
RangeObservableCollection
: anObservableCollection
that supports adding and removing ranges. Caution: this collection is NOT able to be data bound (so far)SortedObservableCollection
: anObservableCollection
which automatically sorts items to a given strategy
ItemClickCommand
: adds command binding for theListView.ItemsClick
event
BooleanToVisibilityConverter
InverseBooleanToVisibilityConverter
InverseNullToVisibilityConverter
NullToVisibilityConverter
StringFormatConverter
ToLowercaseConverter
ToUppercaseConverter
ValueConverterGroup
: emulates a MultiValueConverter
These are useful messages to be used with MvvmLights Messenger
implementation.
CallbackMessageBase
: all messages with a callback can inherit from this to get basic functionality as aSuccessCallback
andCancelCallback
NavigateBackMessage
NavigateMessage
: a message to be used for navigation between views
-
Install package using NuGet:
Install-Package WinRTUtils
-
Reference "Behaviors SDK (XAML)" to your project. This SDK comes with Visual Studio.
Currently only available as comments in the source code. You may take a look at the sample project which is a universal project, so you have samples for both Windows and Windows Phone 8.1.
Feel free to contribute to this project :)