-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Contents of this library
[Disclaimer: work in progress]
Every class gets a short description, links refer to original blog posts
Portable code in WpWinNl basic (this is the WpWinNl project in the source code under portable-win81+wpa81, and becomes the 'WpWinNlBasic' package on NuGet together with WpWinNl.External)
- Misc:
- IBackKeyPressHandler - interface for handling back key handling (only applicable on Phone)
- Behaviors and supporting classes
- BaseAnimationBehavior - a base class for building behaviors animating UI elements
- BaseScaleBehavior, a base class for building animation behaviors that scale UI elements (i.e. fold up or sideways)
- Behavior - a base behavior class to make behavior code easier and compatible with 'Silverlight style' behaviors. See also here for explanation how to write behaviors in PCL
- BehaviorOfT - ditto Behavior
- ClipToBoundsBehavior - makes sure anything displayed in a containers is visible only within that container
- Direction: used by BaseScaleBehavior to determine in which direction the scaling animation should take place
- DragFlickBehavior - a proof of concept behavior using the animation base classes to makes anything draggable and flickable
- DynamicBackgroundBehavior - shows a picture as background on a panel via a bindable string, using an Bing Image search to find an image whose desciption matches the string
- FlipViewPanoramaBehavior - makes a Windows 8 FlipView more or less behave like a Windows Phone 7/8 Panorama
- HideWhenCollectionEmptyBehavior Hides the UI it's attached to it when a bound collection is empty. Useful for displaying errors.
- LimitTextBoxBehavior - limits the number of characters that can be entered into a textbox
- MirrorBehavior - animates mirroring a UI element when activated
- MoveObjectBehavior - a behavior that supports moving elements, for instance to create a scroll-into-view panel (for a Facebook-like GUI)
- SafeBehavior - a base class for safely attaching/detaching events in a behavior (preventing memory leaks)
- SetInitialOpacityBehavior - prevents objects made invisible by data binding to show up initially
- SizeListenerBehavior - makes it possible to (indirectly) data binding to changes in ActualHeight and/or ActualWidth changes of an UI object
- SizeVisualStateChangeBehavior - a behavior that reacts to size changes of a ui element and changes Visual State based on that. Basically aimed at replacing LayoutAwarePage.
- SizeVisualStateMapping - support class for SizeVisualStateChangeBehavior
- TextBoxChangeModelUpdateBehavior - updates bound data behind TextBox immediately after typing, in stead of just after focus change
- UnfoldBehavior - a behavior to animate folding in and out UI elements (implementation of BaseScaleBehavior)
- WidthPercentageBehavior - ehm, no idea. This probably is a leftover from an earlier experiment :)
- Converters
- BaseValueConverter - a base converter class that makes it possible to share code between Windows Phone 8 and Windows (Phone) 8.0
- BaseGeopointConverter - converts a BasicGeoposition to a Geopoint (and back). Useful for binding Map centers (Geopoint) when your model contains a BasicGeoposition
- BoolInvertConverter - converts true to false and false to true
- NegativeValueConverter - converts a numeric value to it's negative value (for instance, 5 to -5)
- NullToCollapsedConverter -Returns Visibility.Collapsed for any value that is null, empty, only whitespaces or an empty guid
- ObjectToStringValueConverter - Converter to create a nicer representation of an object. Add properties of the binded object between { }. The entered propertynames are not case sensitive. Example: add {firstname}{lastname} to the converter parameter for binding to 'person' class Person.FirstName and Person.LastName
- StripHtmlConverter.cs - Removes all HTML from a string and decodes '&XXXX' to regular chars.
- ToListConverter - converts one item to a list to make it bindable to stuff that wants a list
- ToLowerValueConverter - Converts a string to all lowercase letters
- ToUpperValueConverter - Converts a string to all uppercase letters
- VisibilityConverter - converts boolean to Visibility.
- Geofencing
- GeofenceExtensions - an extension method to turn a single Geofence into list op Geopoint, in a shape approximating a circle, for use in visualization
- GeofenceMonitorExtensions - a extension method to return all geofences in a GeofenceMonitor into a list of list of points (see above)
- Maps
- GeopointExtensions - helper extension methods to return a list of points in a shape approximating a circle, around a point on Earth and a given radius, using an optional number of points to make an a shape approximating a circle
- Utilities
- ApplicationExtensions - includes methods to make storing app state ('tombstoning) easier by writing a whole object graph to storage using SilverlightSerializer 2
- BoolVisibilityExtensions - a simple extension method on bool that convert it to Visibility
- DependencyObjectExtensions - part of the animation framework in this namespace, used by the StoryBoardExtensions.
- FrameworkElementExtensions - part of the animation framework in this namespace, used by the animation behaviors to easily get access to translation data.
- IEnumerableExtensions - adds ForEach and Convert to every IEnumerable. Convert is only available in Windows Phone 8.
- LineF and LineFExtensons - class plus extension methods to calculate intersections between lines and/or rectangles
- ManifestAppInfo - helper class to extract data from the application manifest, adapted for Windows Store applications
- ObservableCollectionExtentions - adds AddRange and Swap methods to ObservableCollections
- PointExtensions - basic distance and speed calculus
- ResettableObservableCollection - allows you to manually fire the OncollectionChanged of a ObservableCollection
- StorageFolderExtensions - Replaces the missing TryGetItemAsync method in Windows Phone 8.1
- StorageHelper - helper class class used by ApplicationExtensions to do the actual saving. Basically a Windows (Phone) 8.1 version of this class
-
StoryBoardExtensions - a set of extension methods to create animatons on UI element. See also this article and this article .Animation capabilities include:
- Translation (i.e. moving the element)
- Scaling (make larger/smaller)
- Opacity
- Moving along waypoints
- XElementExtensions - contains one simple extension method for an XElement to easily retrieve attribute values
Portable code in WpWinNl.External
- (root)
- VisualTreeHelperExtensions - helper class methods to traverse the Visual Tree, nicked from Phone7Fx
- Utilities
- BinarySerializer - support class for SilverlightSerializer
- CreateUsingEvent - support class for SilverlightSerializer
- DoNotChecksum - support class for SilverlightSerializer
- DoNotSerialize - support class for SilverlightSerializer
- Entry - support class for SilverlightSerializer
- GetSet - support class for SilverlightSerializer
- GetSetGeneric - support class for SilverlightSerializer
- GetWritableAttributes - support class for SilverlightSerializer
- INavigationService - implementation of NavigationService
- ISerializeObject - support class for SilverlightSerializer
- IStorage - support class for SilverlightSerializer
- NavigationService - a Navigation Helper service based upon code by Laurent Bugnion and Matteo Pagani
- RectangleF - a RectangleF implementation for 'Silverlight', taken from the MSDN forums - original article link is unfortunately no longer valid.
- SerializerAttribute - support class for SilverlightSerializer
SerializerId - support class for SilverlightSerializer - SilverlightSerializer - super fast binary serializer, nicked from Nicolas Humann and ported to Universal Portable code
- TypeExtensions - support class for SilverlightSerializer
Note: SilverlightSerializer support classes, not structs. With the notable exception of DateTimeOffset and BasicGeoposition - I have made adaptions to supports those.
Portable code in WpWinNl.MVVMLight basic (this is the WpWinNl project in the source code under portable-win81+wpa81)
- Audio
- PlaySoundEffectsBehavior - behavior for playing sounds from the view model using the MVVMLight messenger
- PlaySoundEffectMessage - message gebruikt door PlaySoundEffectsBehavior
- BaseModels
- AboutViewModelBase - Base view model for showing a standard about page, now totally rebuilt for Universal Apps
- AppViewModelBase - a simple useful base class for a Main view model handling basic navigation messages
- Behaviors
- MessageDialogBehavior - a behavior to display a MessageDialog from the viewmodel - including callbacks to be executed on Ok or Cancel
- MessageDialogMessage - message used by MessageDialogBehavior
- NavigationHelperBehavior - a work in progress to make the SuspensionHelper better, as a re-useable component
- ScreenShotBehavior - a behavior to make a screenshot of the UI element it's attached to. Stores file in Saved Pictures, then calls a callback for further processing
- ScreenShotMessage - a message used by the view model to fire off the screen shot process
- ScreenShotToStreamBehavior - a behavior to make a screenshot of the UI element it's attached to. Work without using a in-between file. Uses a callback with a stream. Does not work in Windows Phone 8.1, not tested in Windows 8.1. Use at your own discretion.
- ScreenShotToStreamMessage - a message used by the view model to fire off the screen shot process
- Devices
- DevicePairConnectionHelper - and MVVM friendly helper class to make tap+send NFC. Bluetooth browsing and/or WiFi direct connections from Phone to phone, tablet to phone, and tablet to tablet. Warning - Bluetooth Phone to Tablet has some issues in 8.1 Universal apps!
- ConnectMethod, NavigationEventArgsExtensions, NavigationMessage, ReceivedMessageEventArgs - support classes for DevicePairConnectionHelper
- Globalization
- Language - support class for LanguageSettingsViewModel
- LanguageSettingsViewModel - a way do instantly update language display using MVVMLight, first described here, now fully adapted for Universal apps
- Utilities
- SuspensionHelper - see NavigationHelperBehavior. Not used ATM, will probably disappear at some point.
Under TtsBTUniversalDemo you will find a demo app of Universal Tap To Send/Bluetooth browsing
In Win81 there are the following projects
- GUICodeTestApp, a simple app I sometimes use for test driving behaviors
- TestSilverlightSerializer - some actual unit tests for SilverlightSerializer.
- WpWinNl.Maps - a map binding framework for Bing Maps. Work in progress. Not finished, may never finish. Idea behind it was described here
In the wp8 folder you will find the original Windows Phone 8 code, now also divided into two NuGet packages (basic and full). This code is no longer actively being expanded or maintained. Universal apps are the future. Support will likely disappear at the end of 2015.
In Wpa81 you will find two projects:
- WpWinNl.Maps - a map binding framework as described here for Windows Phone 8, only updated for the new universal Here Maps control. Now also supports MapIcon
- WpWinNl.MapBindingDemo - a demo to show off how WpWinNl.Maps works
- WpWinNl.WindowsPhone - some stuff that only works on Windows Phone. Part of the WpWinNl basic package, but only available on Windows Phone.
WpWinNl.WindowsPhone:
-
Controls - the Standard About Page components rewritten for Universal Apps.
- Behaviors
- KeepFromBottomBehavior - a behavior that, in conjunction with the SizeListenerBehavior, can keep a popup stick to the bottom - even if you are using the full screen as described here