August 17, 2016 2:34 pm

Introducing the UWP Community Toolkit

Recently, we released the Windows Anniversary Update and a new Windows Software Developer Kit (SDK) for Windows 10 containing tools, app templates, platform controls, Windows Runtime APIs, emulators and much more, to help create innovative and compelling Universal Windows apps.

Today, we are introducing the open-source UWP Community Toolkit, a new project that enables the developer community to collaborate and contribute new capabilities on top of the SDK.

We designed the toolkit with these goals in mind:

1. Simplified app development: The toolkit includes new capabilities (helper functions, custom controls and app services) that simplify or demonstrate common developer tasks. Where possible, our goal is to allow app developers to get started with just one line of code.
2. Open-Source: The toolkit (source code, issues and roadmap) will be developed as an open-source project. We welcome contributions from the .NET developer community.
3. Alignment with SDK: The feedback from the community on this project will be reflected in future versions of the Windows SDK for Windows 10.

For example, the toolkit makes it easy to share content from your app with social providers like Twitter, taking care of all the OAuth authentication steps for you behind the scenes.


            // Initialize service
            TwitterService.Instance.Initialize("ConsumerKey", "ConsumerSecret", "CallbackUri");

            // Login to Twitter
            await TwitterService.Instance.LoginAsync();
             
            // Post a tweet
            await TwitterService.Instance.TweetStatusAsync("Hello UWP!");

Additionally, the toolkit provides extension methods that allow developers to animate UI elements with just one line of code.


await element.Rotate(30f).Fade(0.5).Offset(5f).StartAsync();

Below you will find more details about the features in the first release, how to get started, the roadmap and how to contribute.

UWP Community Toolkit 1.0

The toolkit can be used by any new or existing UWP application written in C# or VB.NET. Our goal is to support the latest and previous stable release of the SDK and at this time, the toolkit is compatible with apps developed with Windows 10 SDK Build 10586 or above.

The toolkit can be used to build UWP apps for any Windows 10 device, including PC, Mobile, XBOX, IoT and HoloLens. You can also use the toolkit with an existing desktop app converted to UWP using the Desktop Bridge.

Here are just some of the features included in the first release of the toolkit.

image1

We are also releasing the UWP Community Toolkit Sample App in the Windows Store that makes it easy to preview the toolkit capabilities even before installing the tools or downloading the SDK. The app will also allow you to easily copy & paste the code you will need to get started using the toolkit in your project.

image2

Getting Started

It’s easy to get started:

1. Download Visual Studio 2015 with Update 3 and the Windows 10 SDK
2. Create a new UWP project (or open an existing one)
3. Launch Visual Studio 2015
4. Create a new project using the Blank App template under Visual C# Windows Universal

Image 3

5. Add the UWP Community Toolkit to your project
6. In Solution Explorer panel, right click on your project name and select “Manage NuGet Packages”

image4

7. Search for “Microsoft.Toolkit.UWP”
8. Select desired packages and install them

image5

9. Add a reference to the toolkit in your XAML pages or C#

          a. In your XAML page, add a reference at the top of your page


<Page  x:Class="MainPage"
       	xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
...

          b. In your C# page, add the namespaces to the toolkit


using Microsoft.Toolkit.Uwp;
namespace MyApp
{
...

10. You can copy & paste code snippets for each feature from the Sample App, or find more details in the documentation.

Roadmap

In the future, we plan to release stable updates through the Visual Studio NuGet package at a regular cadence.

The toolkit is completely open-sourced on GitHub, including the source code of the toolkit, source code of the sample app and even the documentation. The roadmap for the next release is available here.

  • If you need to report a bug or share a feature request, please use this form.
  • If you would like to contribute your code, please start from here.

We are excited about the contributions that several community members already submitted in this first release, including Morten Nielsen, Scott Lovegrove, Pedro Lamas, Oren Novotny, James Croft, Diederik Krols, Hermit Dave, Thomas Nigro, Laurent Bugnion, Samuel Blanchard and Rudy Hyun. We are looking forward to continuing to grow the toolkit with even more community contributions.

So please go browse the sample app and learn about the experiences, then grab the NuGet package yourself and play around. We want developers to give us feedback on the usability and helpfulness of the features that exist in the toolkit. There is much to do in an open source project: we can get some help to improve accessibility and localization, and ensure the current capabilities work for all apps.

And while you are at it, JOIN THE FUN!

Giorgio Sardo, Principal Group Program Manager, Windows/PAX

David Catuhe, Principal Program Manager, Windows/PAX

Join the conversation

  1. I think in this days Microsoft just forgot about UWP JS/HTML apps, and I’m worrying they will one day just throw the support away…

    • @Kagami

      ManifoldJS & App Studio & GitHub projects that make it easy to develop Hosted Web apps. We are investing heavily in the web platform for apps by adding Service Worker, and we’ve layout our view on the progress of web apps. Visual Studio does have updated templates if you like to work there for UWP Packaged Web Apps.

      We are always looking to evolve our web application investments and are focused on getting key web platform technologies to support the web developer workflow in developing web apps. If you’d like to chat more send me a message on twitter @KevinJHill

      • I really appreciate what Edge team does as it directly helps UWP JS app development, but I want some more support for tools that can make my apps “look” like Windows native apps (as now-dead WinJS did). And I feel some frustration as 1) Windows 10 light/dark mode detection is only available on XAML apps 2) Fetch API is released on Edge but not really available on UWP apps, etc.

    • And rightly so. Infusing HTML5/JS along with .NET technologies is a seriously confusing and costly mistake, which is why no one is using this rather deformed technology. If someone who knows HTML5/JS can already reach the entire web, why would they bother to use UWP that only reaches a very minor market?

      It is no wonder htat MS doesn’t take note of other technologies like Native React and convert UWP/.NET into converted JS. That is where the future of web apps are and really is right now everywhere but MS. No one is using WinJS and should be the next tech that MS shutters. No one is really using UWP either except big corporations being paid to build the apps but that is another matter altogether. Hopefully in another 5 years it will be as good as SL was over 6 years ago and we’ll all be on the same page again.

      • It’s very confusing that you at one hand say the future is javascript, and then dismiss WinJS completely. If you want your webapp/js app in the store, WinJS is your platform of choice, and you get to reuse most of the JS for other platforms and websites too.

        • Completely agree that confusion is the central theme here, which has been the MO of the UWP group for almost half a decade, who continue to demonstrate that they do not understand their own technologies. Clearly the concept of JS being used as bytecode escapes this group. You see this forming in many implementations in all technologies with the exception of MS. Instead, MS continues to promote JS as a first class language (rather than keeping it as a byte-code/assembly language where it belongs) in addition to .NET, resulting in confusion and costly applications. As a result no developer with the exceptions of ones getting paid to do it are using this dysfunctional, confusing technology.

          Developers do not want web app/js in a store. They want their web app on the web. Windows 10 platform doesn’t even reach a billion installs, and will not reach 1 billion by 2018, despite management’s wildest wishes. The web offers OVER 3 billion users right now, without chaining to a limiting platform. Truly confusing why this is a value proposition. The lack of adoption around this failed tech really tells the story here.

          Again the hope is that UWP gets their act together to improve .NET and weed out JS altogether as a first class language, and relegating it to the bytecode of the web, as it is meant to be.

          • I think you’re missing some of the benefits of putting a webmap inside an app. There is a value add: Quick access / promotion via live tiles. It’s more likely people will revisit an app than a website. You also get stuff like notifications, offline support etc etc. Think if it as “build your webapp, and then add a little extra for the app”. This is the benefit. You reach 3 billion people through the web, and you give 350 mio of those an option to get an even more improved experience.
            One simple example is Facebook which is used more through an app than the web. And app traffic has now exceeded browser traffic.

          • With all respect it sounds like you are selling the Kool-aid. The web’s featureset continues to evolve and with each and every passing day the enhanced experience that you might be providing is being mitigated by an equally evolving platform. It seems like a lot of work to put into for a simple fraction of the market. Not to mention you have to pay a registration fee to get in on the market. The web doesn’t have such a fee or registration process. If Windows 10 had a bigger share, then your point might hold more weight. This is why it is confusing to see Microsoft create and promote such confusing technology sets that developers do not adopt, and cancel the ones that actually actually gained traction and provided value, such as Silverlight. The primary goal should be getting .NET back into the browser. Anything else is a waste of time and a major source of confusion.

  2. UWP is fugly and of extremely limited functionality, no advanced controls, no grid view, ugly metro look, no access to full .NET functionality, who in the world would want to develop UWP when there is WPF?

    • It’s completely OK though. They have a UserVoice forum that you can voice your concerns to, and it will take about 4 years before they put something on the backlog to address it, whatever that means.

  3. Hey. I need to use an ImageEx control in my app but it should be in circular form. How can I do that? Can you update it with a CornerRadius property or ShapeMode property?