Category Archives: UWP

Auto Added by WPeMatico

Extend your desktop application with Windows 10 features using the new Visual Studio Application Packaging Project

Visual Studio 2017 15.4 introduced the new Windows Application Packaging project to help you modernizing your application by using the new Windows 10 App Deployment Stack.
We talked about it in our previous post: Visual Studio 2017 Update 4 makes it easy to modernize your app and make it store ready and today we want to describe the new capabilities in Visual Studio 2017 15.5 that enable new scenarios to the Windows application packaging project to take advantage of more Windows 10 features in your applications.
During this article we will cover three examples to highlight the new capabilities added to the packaging project to enable packaging for not only Win32 applications, but also UWP applications and components:
Background execution using UWP background tasks.
Windows Shell integration using the Share Target contract.
Include Win32 code investments in your UWP app package.
The first two samples are existing WPF applications packaged as APPX with extended functionality implemented as UWP components. The first application adds background execution based on UWP background tasks, while the second app shows how to deeply integrate the application with the Windows 10 shell using a widely available feature as Share contracts. Finally, the last app is a UWP entry point that calls to a classic Win32 process that interop with Excel.
Note: Because the UWP components require to be compiled for a specific platform: x86 or x64, the Any CPU solution configuration will not work in any of these samples.
All samples are available in the GitHub repo Windows-Packaging-Samples. These samples require Visual Studio 2017 15.5 Preview 4 or greater, available to download from https://www.visualstudio.com/downloads.
1. WPF with Background Tasks
The Universal Windows Platform includes support for advanced background processing. Background tasks allow running code even when the app is suspended. Background tasks are intended for small work items that do not require user interaction, such as downloading mail, showing a toast notification for an incoming chat message or reacting to a change in a system condition.
To show how to use this feature from your Win32 applications, we are going to implement a small utility that will make an HTTP request to a URL configured by the user and will show the elapsed milliseconds in a Toast Notification.

We will create a WPF application to allow the user to specify the URL to check and enable/disable the background task. The background task will be implemented as a Windows Runtime Component (WINMD). To be able to include this component in the package, we need to create a UWP application that uses the component, and finally add the WPF and UWP projects as references to the packaging project. Below is the list of steps needed.
You can find the complete source code of this sample in the GitHub repository, but if you want to create the sample from scratch here are the most important steps.
Package your desktop application using the packaging project
Add a Windows Runtime component to implement the background task
Add a UWP application that reference the runtime component
Add a reference to the UWP application from the packaging project
Configure the Background task in the manifest
Register the background task from the Desktop application
Once you completed steps 1 to 4, you should have a solution for projects as shown in the image below:

The packaging project references not only the WPF application, but also the UWP project. For this reason, the solution needs to be configured for a specific platform, since UWP is not available for Any CPU configurations.
Background Task implementation
The background task is a C# class that implements the IBackgroundTask interface. This interface defines the Run method that will be called when the system triggers the task.

public sealed class SiteVerifier : IBackgroundTask
{
public async void Run(IBackgroundTaskInstance taskInstance)
{

taskInstance.Canceled += TaskInstance_Canceled;
BackgroundTaskDeferral deferral = taskInstance.GetDeferral();
var msg = await MeasureRequestTime();
ShowToast(msg);
deferral.Complete();
}

private async Task<string> MeasureRequestTime()
{
string msg;
try
{
var url = ApplicationData.Current.LocalSettings.Values["UrlToVerify"] as string;
var http = new HttpClient();
Stopwatch clock = Stopwatch.StartNew();
var response = await http.GetAsync(new Uri(url));
response.EnsureSuccessStatusCode();
var elapsed = clock.ElapsedMilliseconds;
clock.Stop();
msg = $"{url} took {elapsed.ToString()} ms";
}
catch (Exception ex)
{
msg = ex.Message;
}
return msg;
}

Note how we use the LocalSettings in ApplicationData to share information between the WPF application and the UWP background task.
To configure the background task, you need to update the manifest using the manifest designer. Go to the declarations tab, add the background task and configure the entry point as the implementation.

To register the background task in the system, we need to call a Windows 10 API from the WPF application. This API is available in the Windows 10 SDK, and to use it from .NET we need to add the references explained here. Once you have access to the Windows 10 API you can use  the BackgroundTaskRegistration class to configure the background task as shown in the code below:

public void RegisterBackgroundTask(String triggerName)
{
var current = BackgroundTaskRegistration.AllTasks
.Where(b => b.Value.Name == triggerName).FirstOrDefault().Value;

if (current is null)
{
BackgroundTaskBuilder builder = new BackgroundTaskBuilder();
builder.Name = triggerName;
builder.SetTrigger(new MaintenanceTrigger(15, false));
builder.TaskEntryPoint = "HttpPing.SiteVerifier";
builder.Register();
System.Diagnostics.Debug.WriteLine("BGTask registered:" + triggerName);
}
else
{
System.Diagnostics.Debug.WriteLine("Task already:" + triggerName);
}
}

To register the background task, first we make sure the task has not been registered before, and then we use the BackgroundTaskBuilder to configure the name and the Trigger, in this case we are using the MainteinanceTrigger.
2. Register your application as Share Target
Share contracts is a Windows 10 feature that allows the sharing of information between two apps, the sender and the receiver. Thanks to the Desktop Bridge, we can register a UWP application as a Share receiver and then integrate with a Win32 application. Once the app is registered, it will be shown every time the user invokes a share operation as shown below:

In this sample, we are extending a WPF application to become a share target where users can send images from other apps like the Photos app, Edge or even the Shell to our application. We are using the packaging project to include not only the WPF application, but also a UWP application that allows a UWP UI to receive events from the share target. Below you can see the solution explorer with the packaging project referencing the WPF and UWP projects.

The package needs to declare the Share Target, including the name of the UWP application:

When the application gets activated, it receives the share target information from the ShareOperation parameter as shown in the code snippet below:

protected async override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
operation = (ShareOperation)e.Parameter;
if (operation.Data.Contains(StandardDataFormats.StorageItems))
{
var items = await operation.Data.GetStorageItemsAsync();
file = items[0] as StorageFile;
IRandomAccessStreamWithContentType stream = await file.OpenReadAsync();

await this.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async () =>
{
BitmapImage image = new BitmapImage();
this.img.Source = image;
await image.SetSourceAsync(stream);
});
}
}

Now every time the user shares a picture and selects our application, the Share UI application gets invoked and the UWP UI will be displayed.

After clicking the “Share to WPF app” button, the UWP will process the event handler, and will copy the picture to the ApplicationData folder and run the Win32 application using the FullTrustProcessLauncher.

private async void ShareBtn_Click(object sender, RoutedEventArgs e)
{
await file.CopyAsync(ApplicationData.Current.LocalFolder);
operation.ReportCompleted();
await FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync();
}

To use the FullTrustProcessLauncher we will use the Desktop extension to UWP, this extension is available as an SDK reference available in the Add References dialog of the UWP application:

And finally, register the desktop extension and the target executable in the manifest:

<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
IgnorableNamespaces="uap mp rescap desktop">
<… >
<desktop:Extension Category="windows.fullTrustProcess"
Executable="WPFPhotoViewerWPFPhotoViewer.exe" />
<… >

3. Enable Office interop from UWP application
One of the key features of the Desktop Bridge is the ability to include Win32 executables on your application package and run those as full trust process from a UWP application. Now, with the Windows Application Packaging project, you can create packages that contain both UWP and Win32 binaries.
Additionally, to the process launcher, the App Service extension will help you to establish a communication channel between your UWP application and the Win32 process.
In this sample we are going to include a Win32 process (a command line application) to manage an Excel worksheet using office interop.
We start with a UWP application that uses the Telerik data grid to show some tabular data, and we will add button to export the same data to Excel as shown in the image below:

The solution explorer of this example looks very similar to our previous example, with three projects in the solution: The UWP application, the Win32 command line and the packaging project with a reference to both projects. However, note that in this case the Application entry point (shown in bold) is the UWP project:

As we did in our previous example, we need to add a reference to the Desktop extension and register the full trust process in the manifest. But this time, we will also register the application service in the package manifest:

To open the communication channel in the Win32 process, we will add a reference to the Windows API as described here:
To establish the connection, we will use the AppServiceConnection class, where we need to specify the package family name of the application we want to connect with, and the event handlers we will use to process the incoming requests.

Connection = new AppServiceConnection();
connection.AppServiceName = "ExcelInteropService";
connection.PackageFamilyName = Windows.ApplicationModel.Package.Current.Id.FamilyName;
connection.RequestReceived += Connection_RequestReceived;
connection.ServiceClosed += Connection_ServiceClosed;

Conclusion
The new features added to the packaging project in Visual Studio 2017 will help you to modernize your existing desktop applications to get the best from UWP and Win32 in the same package. This new project will help you to configure your package by using the manifest designer, debug your application in the context of the Desktop Bridge and finally, help to create the packages for store submission or sideloading. Here are some resources for more details:
Desktop Bridge docs
Desktop Bridge samples
Windows Application Packaging project samples
App Modernization video on Channel 9
Are you ready to submit your desktop application to the Microsoft Store? Let us know about it here, and we will help you through the process!

The UWP Community Toolkit v2.1

We are extremely excited to announce the latest update to the UWP Community Toolkit, version 2.1!
This update builds on top of the previous version and continues to align the toolkit closer to the Windows 10 Fall Creators Update SDK. Thanks to the continued support and help of the community, all packages have been updated to target the Fall Creators Update, several controls, helpers, and extensions have been added or updated, and the documentation and design time experience have been greatly improved.
Below is a quick list of few of the major updates in this release. Head over to the release notes for a complete overview of what’s new in 2.1.
DockPanel
This release introduces the DockPanel control that provides an easy docking of elements to the left, right, top, bottom or center.

#DockPanel is now part of #UwpToolkit get the pre-release from here https://t.co/ccEz8R6qSa thanks to @metulev & @dotMorten for their review pic.twitter.com/Gfp566kFAE
— Ibraheem Osama (@IbraheemOM) November 2, 2017

HeaderedContentControl and HeaderedItemsControl
There are now two controls, HeaderedContentControl and HeaderedItemsControl that allow content to be easily displayed with a header that can be templated.

&lt;controls:HeaderedContentControl Header=&quot;Hello header!&quot;&gt;
&lt;Grid Background=&quot;Gray&quot;&gt;

&lt;/Grid&gt;
&lt;/&lt;controls:HeaderedContentControl&gt;

Connected and Implicit Animation in XAML
There are two new sets of XAML attached properties that enable working with composition animations directly in XAML
Implicit animations (including show and hide) can now be directly added to the elements in XAML

&lt;Border extensions:VisualExtensions.NormalizedCenterPoint=&quot;0.5&quot;&gt;

&lt;animations:Implicit.ShowAnimations&gt;
&lt;animations:TranslationAnimation Duration=&quot;0:0:1&quot;
To=&quot;0, 100, 0&quot; &gt;&lt;/animations:TranslationAnimation&gt;
&lt;animations:OpacityAnimation Duration=&quot;0:0:1&quot;
To=&quot;1.0&quot;&gt;&lt;/animations:OpacityAnimation&gt;
&lt;/animations:Implicit.ShowAnimations&gt;

&lt;/Border&gt;

Connected animations can now be defined directly on the element in XAML by simply adding the same key on elements on different pages

&lt;!– Page 1 –&gt;
&lt;Border x:Name=&quot;Element&quot; animations:Connected.Key=&quot;item&quot;&gt;&lt;/Border&gt;

&lt;!– Page 2 –&gt;
&lt;Border x:Name=&quot;Element&quot; animations:Connected.Key=&quot;item&quot;&gt;&lt;/Border&gt;

Improved design time experience
Added designer support for controls, including toolbox integration and improved design time experience by placing properties in the proper category in the properties grid with hover tooltip.

Added @VisualStudio Toolbox integration to #UWPToolkit: https://t.co/SZ6Tf3b0cf #DragNDropLikeItsHot pic.twitter.com/G4s73wXUsi
— Morten Nielsen (@dotMorten) August 31, 2017

New SystemInformation properties
SystemInformation class now includes new properties and methods to make it easier to provide first run (or related) experiences or collect richer analytics.

The #uwptoolkit got some new SystemInformation properties fresh from the oven thanks to @mrlacey. What would you use these for? https://t.co/cFjGWSBxPX pic.twitter.com/Pft6nWbx0M
— Nikola Metulev (@metulev) October 13, 2017

Easy transition to new Fall Creators Update controls
To enable a smooth transition from existing toolkit controls to the new Fall Creators Update controls, the HamburgeMenu and SlidableListItem have new properties to use the NavigationView and SwipeControl respectively when running on Fall Creators Update. Take a look at the documentation on how this works.
Documentation
All documentation is now available at Microsoft docs. In addition, there is new API documentation as part of .NET API Browser.
Built by the Community
This update would not have been possible if it wasn’t for the community support and participation. If you are interested in participating in the development, but don’t know how to get started, check out our “help wanted” issues on GitHub.
As a reminder, although most of the development efforts and usage of the UWP Community Toolkit is for Desktop apps, it also works great on Xbox One, Mobile, HoloLens, IoT and Surface Hub devices. You can get started by following this tutorial, or preview the latest features by installing the UWP Community Toolkit Sample App from the Microsoft Store.
To join the conversation on Twitter, use the #uwptoolkit hashtag.

Windows Application Driver is no longer in Beta!

We’re excited to announce the release of Windows Application Driver (WinAppDriver) version 1.0. This 1.0 release is the first WinAppDriver release without the Beta label. This release is a big milestone for the project which was first introduced during Build 2016 and has been growing in adoption.
What is WinAppDriver
Today, it’s easier than ever to build software for multiple platforms and devices. Microsoft supports any developer working on any platform to build software for any device. We’re showing this support in many tooling investments including .Net, UWP with .Net Standard, Rome, VS Code, Xamarin and WSL. In alignment with this vision we need a test tooling strategy that is equally cross platform and cross device, and that is where WinAppDriver fits in.
WinAppDriver is an open standards based tool for UI Test Automation. You can use WinAppDriver to run Automated UI tests for any application on Windows 10. The support for open standards means if you’ve been running UI Test Automation using Appium or Selenium, you can use your existing tools and preferred languages to write tests for Windows applications.
Version 1.0 Details
This release of WinAppDriver is our first non-Beta for a few reasons:
WinAppDriver now supports the core set of features we initially aspired to back when we launched the project. This doesn’t mean we’re done, but we do feel confident about the supported set of features.
Over the last year we’ve received feedback from the community and been improving WinAppDriver’s performance and quality based on that feedback. Thank you to everyone who participated! A big thank you to the Appium community for including WinAppDriver in the Appium installer.
Removing the Beta label shows we believe strongly in the future of Open Standard based tools and plan to continue to invest in WinAppDriver.
Looking ahead
The WinAppDriver team’s focus is to continue building a feature rich and high performance set of tools for running Automated UI tests on Windows devices. This vision includes enabling support for more Windows devices, test scenarios and tool integrations.
The team is actively working on improvements that include:
Addition to workflows such as Continuous Integration
Multi-touch input support
Pen input support
Bringing WinAppDriver to additional Windows devices
Where can I get it?
You can find the v1.0 installer on the WinAppDriver project’s Github page where we also provide samples, documentation and issue tracking:https://github.com/Microsoft/WinAppDriver/releases.
The next release of Appium (1.7.2) will install WinAppDriver v1.0 for you if you don’t already have it.
How do I provide feedback?
Please provide feedback on our Github issue boardhttps://github.com/Microsoft/WinAppDriver/issues
Stay Informed
To stay up to date with WinAppDriver news follow @mrhassanuz and @yosefdurr.
Summary
The v1.0 release of WinAppDriver is a major milestone which no longer has a Beta label.  Please try upgrading to v1.0 as soon as you can. If you haven’t tried WinAppDriver yet, now is a great time.
Thank you from the WinAppDriver Team!

Visual Studio 2017 Update 4 makes it easy to modernize your desktop application and make it store ready

Last year with the Windows 10 Anniversary Update, we introduced the Desktop Bridge to provide desktop applications a path to modernize with the Universal Windows Platform, and to distribute via the Windows Store and the Microsoft Store for Business to all Windows 10 PCs, including devices that are running the Windows 10 S configuration.
The primary developer tool at the time was the Desktop App Converter, a tool that converts your current app installer into a Windows app package (.appx file), which can be submitted to the Windows Store or deployed via your distribution mechanism of choice. With Update 4 for Visual Studio 2017 we now have great support directly in Visual Studio for your Windows desktop application projects (WPF, Winforms, Win32, etc.). With the new tools you can now as you develop them in VS by simply hitting F5!
Let me walk you through an example, step-by-step. I am starting out with this Winforms app that showcases various chart controls. It’s been created several years ago in an older version of VS against .NET 4. Now my goal is to release it in the Windows Store and incrementally modernize it. Here is how easy it is now with Update 4 for Visual Studio 2017.

Step 1 – Add Windows App Packaging project to the solution
Before we start we need to make sure our desktop application project is loaded in Visual Studio 2017 and builds without error. Then in the next step we want to package our application as a Windows App Package (.appx file) so our Winforms app can take advantage of all the same Windows 10 app deployment features that are available to UWP apps: clean install & uninstall, seamless updates, Store distribution and many more. To do this, we will take advantage of the new tooling features introduced in Update 4 for Visual Studio 2017. We are adding a new project of type “Windows Application Packaging Project” to our solution:

Now we need to specify our min/target versions…

…and let the packaging  project know which project output to include in the package. To do so we right-click on the “Applications” node and set a reference to our Winforms project – done!

Important! Select the “DistributionPackage” project as your startup project. Now hit F5 and watch how your app gets packaged, deployed and launched as a Desktop Bridge app. You can start testing and debugging in this new execution context. If you set the Winforms project as startup project and hit F5, you can still test and debug the unpackaged version of your application
Step 2 – Configure app for Windows Store release
Our app is already running as a Desktop Bridge app now and we have successfully tested and debugged it in this configuration. Next we just need to put some finishing touches on the package so it integrates nicely with the Windows 10 Shell (tiles, badges, etc.) and to make sure it conforms to the Store submission requirements. First thing, we need to replace the default visual assets that come with the project template with our real, application-specific assets. This is very easy now in Visual Studio 2017 with the Visual Assets Manager in the package manifest editor:

To prepare for our Store submission we need to create the application in the Windows Dev Center and reserve our application name, provide screenshots for the store front, set the price, age ratings, etc. If you are not planning to distribute via the Windows Store, you can skip this step.

Last thing we need to do before we can release our app to the public is create a package bundle that is ready to deploy and Store-compliant. This bundle can contain binaries for different architectures, resources for different locales as well as the symbols for our binaries so we can later make sense of any crash reports in the Dev Center or Mobile Center. This can be done for Desktop Bridge apps directly from Visual Studio now, just like you would do for any UWP app:

As part of creating the packages we also run the certification tests and then submit the package to the Dev Center for certification and publishing. You can try the result of my submission out now and install the sample app on your machine from the Store by clicking on the badge below – source code for the app is available for your reference here.

What else does this enable for developers?
Aside from distributing and monetizing via Windows Store, your app now enjoys the modern deployment capabilities built into Windows 10. You don’t need to build an installer anymore, updates are automatic and differential. Uninstalls are guaranteed to be clean. Moreover, since your app is now in the Windows 10 App Model, you have access to UWP APIs and features, such as live tiles, Cortana integration, background tasks etc. Another important benefit specifically for Windows Forms apps is the new high DPI support in .NET 4.7, which is included in the Windows Creators Update (1703). Our sample app here is taking advantage of this new support, by following the steps outlined in this article.
And there is more
Talking about installers, did you know that your app package is also your installer on Windows 10? Users can just click to install it, as long as it’s signed with a certificate that is trusted on the target device. This enables you to distribute your modernized desktop application in the way that’s right for your scenario, without having to go through the Store – e.g. for LOB applications in an enterprise. Learn more about it here.

Conclusion
Getting your desktop application development project ready for Windows Store submission is easy now with Visual Studio 2017 Update 4. Once converted to a Windows App Package your app can take advantage of all the Windows 10 platform capabilities and start using new APIs and features on Windows 10. Here are some resources for more details:
Desktop Bridge docs
Desktop Bridge samples
App Modernization video on Channel 9
Are you ready to submit your desktop application to the Windows Store? Let us know about it here, and we will help you through the process!

Adobe XD CC: A New High-Performance UWP App for UI/UX Design

It’s a big day today – after a year of public preview, Adobe released Adobe XD 1.0 on Windows 10 and Mac: a new tool for user experience creators to design, prototype and share interactive designs for apps and websites.

When it comes to designing anything, it’s important to have design tools that support a fast and fluid process – one where you can iterate rapidly through a design, test, and build process: designing at the speed of thought. For interaction design, creative professionals have often used tools that excel at creating images of screens, but these tools that created static images have always missed something: transitions and interactions that demonstrate the experience. Putting an interactive prototype in front of stakeholders that they can try out is now a crucial part of the process, and being able to iterate on design rapidly based on the feedback from the prototype is essential. Being able to create a prototype without any coding is mandatory for this process. Almost a year ago, I wrote about a new app that fits these requirements, when Adobe released a public preview of Adobe Experience Design CC (XD) on Windows and Mac. Since then, Adobe was able to iterate quickly, releasing monthly updates of Adobe XD, responding to early customer feedback and an ambitious list of features that interaction designers wanted. We’re excited to share that today, Adobe XD as part of the Creative Cloud, is available today on Windows and Mac. Here are a few other reasons that that this is such an important release.
XD is a Universal Windows Platform App
Available through Adobe’s Creative Cloud subscription, XD takes advantage of the Universal Windows Platform (UWP) to deliver a modern, high performance, professional design tool. Whether you’re working with one artboard or a hundred, XD gives you the same fast performance. The rendering surface is accelerated by DirectX and the UI is implemented in XAML, C++ and JavaScript.  Using this architecture, Adobe was able to have maximum code reuse between their Mac and Windows versions yet take advantage of the most advanced, platform specific UI layout technology. During XD’s preview period, Adobe was able to iterate quickly, leveraging a proprietary automated testing framework for much of their code built on the Windows Application Driver. The end result is a high-performance, stable, professional tool.
Design, Prototype and Share in One Tool
In creating Adobe XD, the team thought of the whole Design/Test/Build workflow that interactive designers go through, and made an easy-to-use tool for designing experiences, creating rapid prototypes and sharing them with others to get their feedback. With Adobe XD, you can rapidly create screens with standard tools as well as utilizing tools that have been specially designed for UX designers. Repeat Grid, for instance, allows users to quickly create content grids based on a single element – helping designers to simulate the type of content they often have to create. The Assets Panel helps users reuse important design elements such as colors, character styles and symbols – so that making changes across an entire document is fast and easy. At 1.0 XD is also connected to Creative Cloud Libraries, allowing users to leverage content across documents and teams. You can also add artboards for common screen sizes ranging from Android Wear to Surface Pro.

Switching from design to prototype mode is a single click, and you can quickly connect artboards to communicate the flow and paths of multiscreen apps.

Once your prototype is ready for feedback, you can generate shareable web link of the prototype or embed it onto webpage or supported application. Since my team uses Microsoft Teams to collaborate, I can create a tab page in Teams using that link to share the design with my colleagues – they can interact with the prototype in Teams and we can chat about it there.

Designer and Developer Resources
In addition to the tools available, Adobe XD has a number of UI resources available for designers to use while creating, including Apple iOS, Google Material Design, Microsoft Windows, and Microsoft Office UI Fabric. Our Office and Windows teams worked closely with the Adobe XD team to deliver a great set of UI components that designers and developers can use to craft their user experiences. We will continue to work closely in the future as we help developers and designers take advantage of the Fluent Design System.

This Is Just the Beginning
Having worked closely with the Adobe XD team for the past two years, this is a very exciting day. The designers, engineers, testers and product managers that I have met on the Adobe XD team are passionate about their product and are eager to hear your feedback as you try it out, use it and craft the next generation of user experiences. While today marks the 1.0 release of Adobe XD, the team has big plans ahead, including improvements for the way designers and developers work together. Read more about where they’re headed here.
You can download XD as a free trial or as part of Creative Cloud today. Adobe will also be hosting a live stream on UX design from Oct. 24-26. Watch and interact with Daniel Alegria, a Microsoft UX designer in action using XD on Windows. See the schedule and more content here.
Adobe has delivered a new, high-performance, UWP app that is useful to designers, and you should try it out today.

Thanks for attending September’s Windows Community Standup

Thanks everyone for attending and asking some fantastic questions. We strive to answer all questions and be transparent with both what we are building and why we are building them. Kevin’s next Windows Community Standup will be on October 10th, 2017 at Windows Developer Day!
Kevin showed off how .NET Standard 2.0 works in a Universal Windows Platform Application by showing SqlClient code being used directly from a classic WinForm application, dragging those files into the UWP app’s code base and just running the application!
Kevin also showed off some of the advances inside Windows Ink that developers can take advantage of today. Shape recognition and much more!

More Resources for Universal Windows Platform Games with Fall Xbox One Update

Since the advent of consoles, developers have asked for ways to create games for one platform that you could run anywhere. With the release of the Expanded Resources feature in the Windows Fall Creators Update, we are taking the industry closer to that goal than it has ever been before. Now, developers will automatically have access to 6 exclusive cores, 5 GB of ram and full access to the GPU!
When Windows 10 launched in July 2015, Windows and Xbox converged to a single operating system for game development and introduced the Universal Windows Platform (UWP) application model.
UWP apps created for Windows 10 PCs and Xbox games created for Xbox One could be bought and run side by side on consoles, but only in a specialized environment created for lightweight entertainment experiences.
Coming this fall, UWP games published through the Windows Store to Xbox One consoles such as Fallout Shelter by Bethesda Softworks, games in the ID@Xbox program, or games in the Xbox Live Creators Program will be able to access the expanded resources. UWP game developers get both a performance boost and a much larger sandbox in which to Dream, Build, and Play.
Team Xbox is excited to see how creators take advantage of this extra power to bring even more variety and creativity to Xbox One. ANYONE can become a creator for Xbox One, get started here.
*D3D12-Based UWP Games get access to the full power of the GPU

Dream.Build.Play 2017 Challenge Updates

When we launched the Dream.Build.Play 2017 Challenge in June, we had big plans for not just a contest, but a way for indie game developers to connect with each other and show off their skills and experience. We didn’t set out to replace existing communities, but maybe we could create a little something that would complement other systems. Our goal is always to help indie developers be as successful as possible, and Dream.Build.Play 2017 Challenge is just one thing we thought up.
Before I begin, I do want to say that this article is long. I’ve got a lot of cool and important information to share, and rather than break it up into individual posts and have you search for it in multiple places, I’m throwing it all down in one place. Come back and refer to this page as often as you need to. Ok, let’s get started!
State of Play
By the look of it, that contest is generating some great interest from you all. To date there are over 2,000 indie developers from all walks of life signed up on the competition site, and we know there are more to come. And what do I mean by “walks of life”? Well, we have students, we have professional developers trying their hand at building a game, we have dedicated indie studios who want to showcase their talents.
But it doesn’t stop there. We have indie developers from all over the world too. My home country, Australia, is represented, as is the US and the UK. But how about Bangladesh? Yep. Austria? Yep. Greece, Sweden, France, Brazil… The list goes on. Dream.Build.Play is turning out to be a truly global experience.
That’s all great and all, you say, but what about these big plans you mentioned?
Glad you asked.
The Big Plans
This month, we launched phase two of the Dream.Build.Play website. It takes the contest and amps up the stuff you can do with it in a big way, but we’ve tried to do it in a thoughtful way that will help you out for other things too.
As of now, you can log into the Dream.Build.Play website and check out the community of developers who have created profiles. And you can create your own too. Each profile comes with name, country, photo and a brief bio description. But then it can be enhanced with what I consider the special sauce of Dream.Build.Play. Besides that basic biographical info, you can add all the ways people can connect with you, plus all the skills you have, plus all the games you’ve worked on.
Yes, all. First, take connections and networks. You can choose from Xbox, LinkedIn, Twitter, Facebook and so on, but you can also add your DeviantArt or Bandcamp accounts, or GitHub, Unity, Unreal or Stack Overflow accounts. And a whole lot more. And if there’s something missing, we’ve got you covered with a Personal Website link. Add as many as you want. Add none. It’s up to you.
When it comes to skills, it gets event better. We’ve built an extensive list of skills, from a variety of programming languages, to middleware and game engines, to more softer skills like game design. But if you want to advertise a skill that’s not listed, just add it in, and as long as it passes our moderation queue, it’ll show up in your profile.
Adding games is where the magic really starts to show through. You can add every game you’ve worked on, and each one comes with its own set of information. From the game’s name and genre, to cover art, screenshots and even a trailer video. And then add a description, and what platform category it belongs to and you’re almost there. Every game entry can have its own set of connections. So if you have a website for your game, a YouTube link, a Twitch channel and a Facebook page, add them all so people can check it out.
Why is this important?
We created the community like this for a very important reason: so you can all connect with each other. Let me give you an example.
Dave is building a game in Unity, but he doesn’t have a single audio engineering bone in his body. But he really wants to enter the Dream.Build.Play 2017 Challenge and potentially win big cash money. I can relate.
Dave heads to the Community page and filters the Skills list for Audio Engineering. In the results pane, he sees a few other members who have that skill. He clicks on Grace’s profile. Dave sees that Grace not only has Audio Engineering as a listed skill, but she also has Unity. Great! She’ll likely know how to incorporate sound into his Unity game.
He can then check out the games Grace has listed, heading to their websites, or videos, and check out the audio that she has created previously. He likes the sounds he’s hearing and decides that he wants to see if Grace would like to join him on his epic journey. He can then return to Grace’s profile and click on any of the Connections she has added and get in touch.
Cool!
Cooler, if they agree to join forces, the Dream.Build.Play website allows them to do just that. All Dave has to do is head to his game page, edit it and add Grace to join his team. Bam! Both will now be listed as being part of the cool game that they’re collaborating on.
I love this community
One of my favorite things about the game developer community, is the willingness of everyone to help out and give people tips, feedback and advice on how to improve or fix their creations. I wanted to flag one great example of that that came out this week: Simon Jackson’s post on Unity and Visual Studio.
Simon and fellow indie dev Jim Perry brought to my attention a small issue between Visual Studio, Unity and Xbox Live. They thoughtfully investigated and figured out a workaround, and for all of you who are actively building UWP games in Unity who want to integrate Xbox Live, Simon has written up their findings on his blog: https://darkgenesis.zenithmoon.com/resolving-build-issues-for-uwp-packages-with-unity/
Also, I also want to highlight that Simon has created a special area on DevPost for Dream.Build.Play here: https://devpost.com/software/dreambuildplayresources. If you’re looking for additional info or resources, or you want to contribute back to the community, please head there and take a look.
Quick recap so far
A quick summary of where we are:
Phase two of Dream.Build.Play has launched. Woo!
You can now add your personal profile, complete with skills, connections and games.
Games can have their own connections, as well as screenshots, videos and more.
Games do NOT have to be for the Dream.Build.Play 2017 Challenge. They can be used to showcase your experience.
You can search the community based on skill.
You can form teams.
One special note. As I mentioned right at the beginning of this post, we’ve had (to date) over 2,000 people register to compete. If you look on the Community page and see less than that, that’s because only those people who have created a profile will show up on that page. So get in there and create your profile and make sure your friends and colleagues are heading back to Dream.Build.Play and updating theirs too, so the community fills out.
But wait, there’s more!
I hope you didn’t think we were stopping there. I’ve got some exciting news to share! We’re announcing a new contest as part of Dream.Build.Play: The Developer Diary Contest.
The Developer Diary contest challenges Dream.Build.Play creators and developers to document their journey in building a game. It has some minimal requirements such as needing to do at least five posts or videos, across at least a month in duration, but it’s really about encouraging you all to share your stories with each other.
Talk about a pain point you encountered and tell people how you fixed it. Or maybe something you were pleasantly surprised by when you started exploring UWP. Or how about how Azure made your life easier with some kind of cloud coolness.
Here’s a great example from Tarh Ik who we shared this with just a couple of days ago: https://tarhik.wordpress.com/2017/08/23/antimatter-instance-dev-log-entry-1/
And yes, the game he’s blogging about is indeed on Dream.Build.Play! https://developer.microsoft.com/en-us/Windows/dream-build-play/game/7
You’ll have until December 31st to create your Developer Diary and be in the running to win $5,000 cash and the adulation of your peers. Get to it!
Need help?
To finish off this article, I know that creating a game can be tough. But we’re here to help. Not only can you post questions to our Windows Developer Twitter handle or Facebook group, but you can grab a whole bunch of documentation, all conveniently located in one place: The UWP Game Development Guide!
Until next time, good luck, create your profile and add all the games you’ve worked on, and see you in the Dream.Build.Play community!
Oh, and keep your eyes peeled. We may have some other announcements soon.

Cognitive Toolkit Model Evaluation in UWP

We are excited the share with you that Microsoft Cognitive Toolkit (CNTK) 2.1 has added support for model evaluation on UWP applications. This means you can harness the power of deep learning in your Windows apps delivered via the Windows Store! Read on to find out how can infuse your apps with the power of AI.
The Virtuous Intelligence Cycle
Cloud-connected devices can perform operations locally or delegate them to the cloud. The virtually unlimited compute power of the cloud makes it a good choice for running tasks that need significant compute power but don’t require low latency. In machine learning, model training is an example of such a task. It might require hours or days to train a model, but once the model is trained, deploying it closer to where the data is generated has some very useful properties. First, it reduces the roundtrip latency inherently unavoidable in cloud communication. This is critical for time-sensitive deep learning scenarios like self-driving cars and industrial equipment failure detection. Second, it can unlock insights from data that were previously discarded due to network transmission costs. And finally, it allows machine learning solutions in scenarios with intermittent network connectivity like search & rescue, agriculture and others.
We refer to devices with non-trivial compute power that are in closer proximity to the data source as “intelligent edge” devices. Intelligent edge devices can vary broadly depending on scenario as shown in the figure below.

In the virtuous intelligence cycle, deep learning models trained in the cloud are deployed and evaluated at the edge. Additionally, the edge feeds valuable data back to the cloud where the models are improved and redeployed to the edge, hence completing the virtuous cycle.
The improvements described in this post allow UWP applications to be part of the intelligent edge where deep learning models can be evaluated.
Image Classification Example
Let’s look at an example where an image classification machine learning model is built into an UWP application. The app allows you to pick a CNTK compatible model to perform image classification on an image. Several pre-trained models to use for this purpose are available at this link.
The code for the entire solution is available in the CNTK Github repo.
Currently, only C++ CNTK UWP bindings are supported. However, the sample demonstrates how a C# based UWP solution can perform model evaluation by referencing a WinRT library that wraps the UWP-compatible CNTK native components available on NuGet.

packages.config specifies the NuGet packages the library uses, and points to the UWP-compatible package:

<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="CNTK.UWP.CPUOnly" version="2.1.0" targetFramework="native" />
</packages>
 

This NuGet package provides UWP-compatible CNTK components, including the OpenBLAS math library, for CPU-based model evaluation. ImageRecognizerLib exposes Create and RecognizeObjectAsync methods used to load the pre-trained CNTK model and classify the specified image input as an array of bytes.
The rest of the solution is a few simple XAML UI elements to accept input from the user. Here is a quick animation of the app in action:

Now it’s your turn!
We’ve demonstrated how you can use the newly added UWP support in CNTK to bring the next level of intelligence to your Windows applications. We can’t wait to see the awesome apps you will build with this exciting new technology!

The UWP Community Toolkit v2.0

Today, the UWP Community Toolkit graduates to version 2.0 and sets the stage for future releases.
There have been seven releases since the UWP Community Toolkit was first introduced exactly one year ago and version 2.0 is the first major and largest update to date. The developer community has worked enthusiastically to build something that is used by thousands of developers every month. Today, there are over 100 contributors, and developers have downloaded the packages over 250,000 times. This would not be possible without the strength of the community – Thank You!
For developers, and designers alike
Beginning with the v2.0 release, the UWP Community Toolkit is making efforts to align with the latest Windows 10 Fall Creators Update to enable developers to take advantage of the new APIs and the new Fluent Design System.
The Fluent Design System defines several foundational elements that will make new designs perform beautifully across devices, inputs and dimensions. To prepare for the general availability of the Fall Creators Update later this year, the community has committed to update all UWP Community Toolkit controls to adopt Fluent Design. Over the coming months, new and existing controls will be updated to support light, depth, material, motion and scale. The sample app will also be updated to take full advantage of the new foundational elements to demonstrate what is possible.

Updating the Sample App
The UWP Community Toolkit Sample App showcases toolkit features for developers by providing tools to get started using the toolkit in their apps, and it continues to get better. In the largest update since the initial release, developers can now edit XAML directly in the sample app and instantaneously view the results side by side. This is a very powerful addition that allows developers to get started with development immediately by simply downloading the app from the store.
But that’s not all. Taking inspiration from the Fall Creators Update, the sample app has been updated to use an improved and redesigned navigation model. The navigation has moved to the top and it’s now much easier to get to any sample. In addition, a new landing page has been added to make it easier to find what is new and keep track of favorite samples.

Beyond UWP
The UWP Community Toolkit has received feedback about the importance of supporting cross-platform development to enable developers to share more of their code across platforms. Version 2.0 introduces two new packages: Microsoft.Toolkit and Microsoft.Toolkit.Services with the commitment to support more cross platform APIs in future releases. These packages are built with .NET Standard and support any platform with .NET Standard 1.4 and above. The Bing Service is the first API to go cross-platform and there is currently work underway to move more services to the new packages.
What else is new?
As with every release, the community has worked together to share their ideas, build new controls and helpers libraries and improve the UWP Community Toolkit for everyone. This release is no different.
There are several large additions and updates to highlight here, but make sure to visit our release notes for all additions and improvements:
Added InAppNotification control – a control to show local notifications in app
Added TextToolbar control – text editing control that enables easy rich text and Markdown formatting
Updated Expander to support all orientations and added LayoutTranformControl from the WinRT XAML Toolkit
Updated Menu to support underline characters, orientation and many other improvements
This is just the start
We learned a lot in the past year, and the community has worked together to make toolkit APIs as easy and flexible as possible. Few APIs and packages have been restructured to make them more convenient for developers and allowed more flexibility for future additions and updates. For example, the Microsoft.Toolkit.UWP.Connectivity package was added to unify all connectivity APIs such as Bluetooth and networking. Likewise, all extensions and helpers are now unified under a single namespace and are consistent across API.
As a reminder, although most of the development efforts and usage of the UWP Community Toolkit is for Desktop apps, it also works great on Xbox One, Mobile, HoloLens, IoT and Surface Hub devices. You can get started by following this tutorial, or preview the latest features by installing the UWP Community Toolkit Sample App from the Windows Store.
If you would like to contribute, please join us on GitHub! To join the conversation on Twitter, use the #uwptoolkit hashtag.