I’ve received several requests for publishing the MultiTouch Behaviors on the NuGet gallery so I created a simple package containing support for the Windows Phone and Silverlight platforms.
To enable your project for MultiTouch, just run the following command in the Package Manager Console and all the libraries and dependencies will be added to the Visual Studio project:
PM> Install-Package MultiTouchBehaviors
Alternatively just search for the package selecting Tools->Library Package Manager->Manage NuGet Packages for Solution from Visual Studio 2012.
If you are interested in creating a NuGet package for your open-source project, register an account here in the gallery and follow the instructions described in the section “Creating and Publishing a Package“: they are very clear and contain detailed information about the process.
The package definition for MultiTouch is also available in the Source Code section on CodePlex.
The last week has been very exciting for Microsoft developers: The //build/ conference in Redmond was full of amazing content including Windows 8, Windows Phone 8 SDK, Microsoft Surface, Xbox SmartGlass, Kinect for Windows and the new language TypeScript.
Unfortunately I hadn’t the possibility to participate at the conference but had some free time during the week-end to watch some of the recorded sessions available here on Channel9: this is really a great resource and I suggest everyone interested in Microsoft technologies to download some videos and have fun with it.
I decided then to take a look at the new features available in Windows Phone 8 and the related SDK: Justin Angel has a great article about this topic in the Nokia Developer Community.
To get my hands dirty I moved then on my personal Open-Source project “Multi-Touch Behaviors” on CodePlex: this is a set of Epression Blend Behaviors for different platforms including Windows Phone, Silverlight and WPF for applying gestures and manipulations (like the one available in the “old” ScatterView control) to generic XAML elements.
The project was not yet updated to Windows Phone 8 so I took this opportunity and experimented with the new SDK: this was really a great experience since I was able to upgrade quickly all my samples to the new platform using the same codebase used for the Silverlight version.
Unfortunately I haven’t the possibility to test the performance on a real Windows Phone 8 device at the moment but the first impressions are really positive.
I have already checked in the code for WP8 here, I’m planning more testing and development in the future.
Happy XAMLing everyone
As announced on the Windows Phone Developer Blog, Windows Phone SDK 7.1.1 Update is now available for download on the Microsoft Download Center.
The WPSDK 7.1.1 Update provides a WPSDK patch that enables developers to develop and test for the recently announced Windows Phone 7.5 256 MB devices, as well to run the WPSDK 7.1 on the Windows 8 Consumer Preview release via the following:
- Updated 512 MB OS Emulator Image: An updated build Windows Phone OS 7.1 (Build 8773)
- New 256 MB OS Emulator Image: A new Windows Phone OS 7.1 emulator image (Build 8773) that emulates running on 256 MB devices
- Emulator Choice: Ability to debug or run your WP apps in either the 256 MB or 512 MB emulator
- Windows 8 Support: An updated emulator is included, which can run on Windows 8
- IntelliSense support for adding the new 512 MB requirement to the Windows Phone App Manifest file
News since the CTP release last month:
- ‘Go Live’ license: The update now has a ‘Go Live’ license; developers running WPSDK 7.1.1 are now empowered to publish their Windows Phone apps to the Windows Phone Marketplace
- Full Localization: WPSDK now supports all 10 IDE languages; and the OS image now has Malay and Indonesian
- Windows 8 Support: The updated emulator will now run on Windows 8; note that the OS is still not officially supported by developer support until the final OS release
Windows Phone SDK 7.1.1 Update CTP Download Center page
For additional information on this release, please refer the post on the WP Developer Blog.
Fellow MVP Daniel Vaughan has published in these days on CodePlex a new version of his “Calcium” framework targeting Windows Phone.
From the official release notes:
“Calcium for Windows Phone is a consolidation of the infrastructure code that has been written for the book Windows Phone 7.5 Unleashed, and is already used by a number of published apps.
Some of Calcium for Windows Phone features include:
- A user option’s system that allows you to add a settable option to an options page, with a single line of code.
- A bindable application bar with toggle buttons and menu items, hyperlink button/menu items, which allows you to host multiple application bars in a Pivot.
- Built-in support for localization. Bindable resources allows the user to change the interface language at run-time.
- An IoC container and DI infrastructure, and templates to allow you to hide or show a Purchase link in your app depending on the • Trial state of your app and so forth.
- Templates for Views with ViewModels.
- Attribute based state persistence system.
- Message service that allows you to display messages and ask the user questions from your ViewModel.
- Launchers and Choosers abstraction layer.
- Input Validation system, with styles customized for displaying validation errors.
And much more!
Unlike Calcium for WPF and Silverlight, Calcium for Windows Phone does not depend on Prism and has a smaller footprint, more suitable for the mobile platform.”
Other useful resources:
Fortify your apps with Calcium for Windows Phone!
I’ve just published on CodePlex and the Expression gallery a new release of the Multi-Touch behaviors including these new features:
- support for Windows Phone 7.1 Beta 2 (refresh) “Mango”;
- added new property “IgnoredTypes” for excluding particular control types from the manipulations (thanks to Richie for the suggestions, feedback and code samples);
- the “Manipulation Processor” and “Inertia Processor” are now exposed by the behavior in order to enable personalized manipulations and gestures;
- new properties: CenterX, CenterY, Rotation, Scale permit to support custom gestures like “DoupleTap” zoom;
- Silverlight 4 and Windows Phone 7.1 samples updated with a simple ”DoubleTap” zoom example using the new exposed properties.
The source code and samples are available for download here.
In these days I’m receiving several questions in the Multi-Touch Behaviors forums about enabling Multi-Touch manipulations in Windows Phone applications composed by more than one page.
Today I’ve modified the available sample inserting an additional page containing an image enabled for translation, rotation, zoom and inertia via the usual “MultiTouchBehavior“:
Starting from release 0.6.1 it’s now possible to use the Behavior in different pages of the application, in this way enabling multi-touch in different elements of a Windows Phone 7 application:
As usually the sample code is available for download on http://multitouch.codeplex.com, check out the Visual Studio solution “SilverlightWP7MultiTouch.sln” which contains all necessary libraries.
Some useful links:
Happy Silverlighting with Windows Phone!
Check out this great sample available in the XNA community site.
It includes code that uses the Gestures API to enable hold, drag, tap, flick, pinch gestures.
I’ve just finished some experiments using the Windows Phone 7 emulator and the “Microsoft Surface Manipulations and Inertia Sample for Microsoft Silverlight” in order to enable Multi-Touch gestures using Blend Behaviors:
This new implementation, now available for download in the Expression Gallery, permits to enable Multi-Touch gestures (the usual translation, rotation, zoom and inertia) on separate User Controls available in the same container.
In this way you can apply distinct Multi-Touch manipulations (inertia included) to single elements using a single code in xaml:
<Grid x:Name="ContentPanel" Grid.Row="1">
<Image Source="Images/Desert.jpg" x:Name="image1">
<WP7:MultiTouchManipulationBehavior IsInertiaEnabled="True" IsRotateEnabled="True" IsTranslateEnabled="True" IsScaleEnabled="True" MinimumScaleRadius="1" MaximumScaleRadius="720"/>
<Image Source="Images/Jellyfish.jpg" x:Name="image2">
<WP7:MultiTouchManipulationBehavior IsInertiaEnabled="True" IsRotateEnabled="True" IsTranslateEnabled="True" IsScaleEnabled="True" MinimumScaleRadius="60" MaximumScaleRadius="360"/>
Alternatively you can use Blend inserting a reference to the project MultiTouch.Behaviors.Silverlight.WP7 and then dragging the MultiTouchManipulationBehavior from the Assets section to the control to be touch-enabled:
This one has been an interesting exercise in porting code written for Silverlight to Windows Phone: I had only to create a Windows Phone 7 project and add to it the code already available for the Silverlight version and all worked well quite quickly.
At this time the behavior works only in the fixed Portrait orientation of Windows Phone: if you change to Landscape the manipulation doesn’t work well. I’ll have to investigate further and currently I don’t have a physical device to test (I’d really love to have a device to try it ).
Some time ago I’ve started a Codeplex project dedicated to multi-touch, available on Codeplex at http://multitouch.codeplex.com.
The goal of this project is to provide an unified interface for Silverlight, WPF and Windows Phone 7 in order to provide multi-touch support using a visual approach via the concept of Behavior available in Expression Blend.
Recently I had the honor to welcome in the project a pillar of the Silverlight community, Laurent Bugnion, who is working on the Windows Phone 7 version of the Behavior:
Laurent has just published on his blog two awesome videos to get started with this new Behavior, and has created a specific section on his site http://www.galasoft.ch/touch to announce updates and publish content.
A special thanks to Pete Blois of the Expression Blend team for his help and contributions.
Stay tuned as we’ll be posting updates very soon