Universal Helpers library for the Universal Windows Platform

It’s been some time since I posted something about my Universal Helpers library. The biggest news is that the library has been updated to support the Universal Windows Platform, allowing its usage on projects for Windows desktops, laptops, tablets, mobile devices and more! Apart from that, I’ve updated the library to include some additional behaviors and helpful classes. Let’s take a walkthrough. All this was made possible due to the release (open source!) of XAML Behaviors for UWP.

Behaviors

DragElementBehavior

Allows you to make a UIElement draggable, either by mouse or touch. It has options for

– allow the user to rotate, via multitouch

– allow the user to scale, via multitouch. User can select the maximum scale and the minimum scale.

– you can assign a container so that the draggable element can never leave the container’s bounds

– option whether the draggable element has inertia (i.e. will continue movement by decelerating when the user drags it and lets it go)

image

TapStoryboardBehavior

The TapStoryboardbehavior is useful for scenarios where we want to tap an element, start a storyboard and execute a method when the storyboard finishes running. It also has an option to specify whether the method is on the code-behind file or in the VM (i.e. in the DataContext of the page, for MVVM scenarios).

image

FeedbackBehavior

The FeedbackBehavior allows the user to implement a feedback functionality when an element is tapped and “pointer over”, specifically a scale animation on pointer over and an opacity change when tapped. This is used to notify the end user that she has indeed tapped the specified element.

SelectAllTextOnFocusBehavior

This simple behavior makes all text on a TextBox selected when the user taps on the TextBox.

Validation Behaviors

Read More »