Agnostic

  1. Windows Universal Platform apps samples - in all languages

C♯

  1. Building Accessible UWP Apps
  2. Developing Windows 10 Universal Apps course - Part 1
  3. Developing Windows 10 Universal Apps course - Part 2
  4. Template10 - bootstrap for c# uwp apps
  5. How to unit test a Windows 10 app in Visual Studio?
  6. C# 6 features that help you write cleaner code

SQLite for Universal Windows Platform

In order to use SQLite on a Universal Windows Platform, you need to install a VS specific extension:

Pic

Appium - Windows App Driver

Appium is a tool to perform automated UI tests. In order to use it you need to install the tool. Please visit: WinAppDriver

You can obtain the installer itself here

Getting The APP ID to use with Appium (Windows App Driver)

Get the Package family name from the Package.appxmanifest > Packaging tab

Pic

DesiredCapabilities appCapabilities = new DesiredCapabilities();
appCapabilities.SetCapability("app", "cf59c34d-6a44-4b82-9029-ad2fc3cc2611_xnnwpqakf2yqj!App");

Problems with the C♯ + XAML approach

Pic

VisualStudio TroubleShooting

When debugging tests in apps using Template10, the following error will may occur:

Pic

In that case, follow VS suggestion and click in the link Get general help for this exception. There you will find instructions to turn off the Just My Code debugging option.

Unable to run UnitTests

There seems to be some issues between Template10 and MVVMLight that might cause tests not to run while yielding something like:

A user callback threw an exception.  Check the exception stack and inner exception to determine the callback that failed.

Looking at this github issue comment the solution is to add the [Bindable] annotation to the Locator class.

Disabling parallel test execution

Tests via Appium cannot be ran in parallel (WinAppDriver will fail to create sessions). xUnit runs tests in parallel by default, so its necessary to configure the xUnit runner

To stop tests from running in parallel, just create a App.config file on the UI tests project with:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>
    <add key="xunit.parallelizeTestCollections" value="false"/>
  </appSettings>
</configuration>

Problems handling ENTER key with KeyDown on a TextBox

It seems that ENTER triggers 2 events! This is a known bug by Microsoft since 2013 and still they did nothing to correct: