Aligning UWP CommandBar content after Anniversary Update

The Universal Windows Platform CommandBar control has a new feature called dynamic overflow since the Anniversary Update. This automatically adjusts the number of presented app bar buttons so that they fit and puts the additional commands in the secondary (overflow) menu. This addition has however inadvertently caused some headaches for developers who use Content property of the  CommandBar  to display additional content – it turns out, that alignment of the content now doesn’t work properly.

The problem

Let’s demonstrate the issue with a simple example.

We would expect, that the content of the CommandBar is aligned to the center of its available area, which indeed was the case before the Anniversary Update.

Since Anniversary 14393 SDK, the HorizontalContentAlignment  property is by default not respected.

The CommandBar does not respect the HorizontalContentAlignment property by default

Cause of the problem

The default control templates are stored in a XAML resource dictionary file on the following path: C:\Program Files (x86)\Windows Kits\10\DesignTime\CommonConfiguration\Neutral\UAP\10.0.14393.0\Generic\generic.xaml . If you search for the CommandBar  template inside this file, you will find out that it contains a new VisualStateGroup :

As you can see, when dynamic overflow is enabled, sizing of the columns in the main layout Grid of the control changes.

In the default visual state ( DynamicOverflowDisabled ) is the ContentControlColumnDefinition.Width  set to *  (star) and the PrimaryItemsControlColumnDefinition.Width  set to Auto . This means that the app bar buttons on the right take up a certain width and the remaining space is dedicated to the content.

With dynamic overflow enabled, sizing of the columns is flipped. The control lets the primary items column take up as much space as it can (so that the available space can be used for the buttons and the number of displayable buttons can be calculated at runtime) and the content column now gets only the width it actually needs. Whichever alignment you set to the content doesn’t matter. The content will always seem left aligned, because its column is sized just to fit.

Since the Anniversary Update, dynamic overflow of the command bar is enabled by default.


You can disable dynamic overflow using the IsDynamicOverflowEnabledproperty. Although you have to make sure that the app bar buttons display well on all display sizes, you can also align the content as you please.

Disabling the dynamic overflow feature fixes the content alignment problem

If you want to preserve the dynamic overflow feature, you may just want to put some margin around your content to make sure it looks aligned. Of course, to support multiple different display sizes, you should adjust the margins using Adaptive Triggers.

Using custom fonts in C# UWP apps

Although the default Windows 10 font – Segoe UI – is certainly very beautiful, you might sometimes want to give your Universal Windows Platform app a bit of uniqueness and personality using a custom font.

You can use almost any .ttf and .otf font file and include it in your application package. .woff and .eot fonts are currently not supported in C# UWP apps (but you can use them in JavaScript UWP apps).

Getting a font

Firstly find a custom font you want to use. There are many fonts you can use for free (even in commercial projects), as well as many fonts you can purchase.

Google Fonts and Font Squirrel are both great collections of countless free fonts to choose from.

After you choose the font you like, download its .ttf or .otf file and add it into your UWP app project as a Content file.

Ensure that the font is added with the Content Build Action
Ensure that the font is added with the Content Build Action

Setting the font in XAML

Each text control in XAML has a FontFamily property, which you can use to set the font. For the preinstalled fonts it is sufficient to just use the font name itself. For custom fonts we have to be more specific:

[FontFilePath] is the relative path to the font file in the project. In case you have an ArimaMadurai-Black.ttf font in the Assets/Fonts folder of your project, you will use /Assets/Fonts/ArimaMadurai-Black.ttf as the path.

[FontName] is the name of the font. Here things are a little tricky. Some fonts require the font name to include the type suffix (font weight, italics) and some don’t. You might need to use trial end error to find out which form is requested. The XAML designer should reflect the change immediately.

Using the property window

There is an alternative to manually setting the font family in XAML – using the XAML properties window. Select a text-based control and then expand the Text settings group in the property manager. Using the font dropdown, you can select not only from the installed fonts, but also from the custom fonts you have added into your project (these should be on top of the list).

Choosing a font in the properties window

Note that the properties window always adds the font type suffix to the FontFamily value. In case the font doesn’t display correctly when you apply the setting, remove the font type manually.

Setting font family in code

Changing the font family in code is as easy as creating an instance of the Windows.UI.Xaml.Media.FontFamily class with the same value as in XAML passed to the constructor.

DirectWrite fonts

Windows 10 added XAML integration of DirectWrite downloadable fonts. With this feature you can set the font family of your text controls to a font that is not currently installed on the device and DirectWrite will download the font on-demand in the background. Before the font is downloaded, a fallback font will be displayed instead. Also, it should be able to download just the portions of the font that you need, which is beneficial for large fonts that support languages like Chinese, Japanese or Korean. The downloaded fonts are stored in a system font cache, so that they can be reused by any app.

This feature seems pretty neat, but it is unfortunately completely undocumented. The only resource regarding this functionality seems to be the XamlCloudFontIntegration sample in the Windows Universal Samples repository on Github. The sample contains three fonts that can be downloaded by DirectWrite and also a PowerShell script that lets you clear the system font cache.

You can see and try out the sample code for this post on my GitHub.

Summary of Microsoft Connect(); // 2016

From 16. 11. to 18. 11. 2016 the third year in a row the Microsoft Connect(); developer conference took place in New York and had been streamed on-line.

The team responsible for the conference promised content full of surprises, announcements and interesting sessions and I can honestly say that they did deliver.

The main keynote was traditionally led by Scott Guthrie and Scott Hanselman. Let’s do a recap of the most interesting things we have learnt!

Any developer. Any app. Any platform.

This is the new mantra of Microsoft in the world of mobile and cloud development. The goal is to provide the best tools to every single developer. Whether you are building a mobile app for Windows, Android or iOS, desktop app for Windows or Mac, web app in ASP.NET or Node.js, or a cloud solution on Microsoft Azure, whether you prefer PC or Mac or Linux, Microsoft tools are at your service.



What a few years ago no one would predict or probably even dare to say as a joke has become a reality – Microsoft is the most active organization on GitHub with over 16 400 contributors and has become a platinum member of the Linux Foundation.

screen-shot-2016-09-15-at-5-53-28-pmThe importance of open-source software is clear and Microsoft values the opportunity to work with the wide developer community.

The New Microsoft is open-first.

Visual Studio

The Visual Studio family of integrated development environments (IDEs) is the cornerstone of development in Microsoft technology stack and the conference therefore dedicated a substantial time showing the newest updates of the IDEs.

Visual Studio Code

Up until now the youngest member of the Visual Studio family – Code – has been able to grow up in the 18 months on market and provides a fast and lightweight developer tool for all operating systems. Because the project is fully open-source, it is improving really fast. Git, GitHub and Azure integration, smart IntelliSense and hundreds of extensions make Code an interesting alternative even to larger IDEs.

The versatility of the tool was demonstrated during the keynote by building a Node.js app using MongoDB NoSQL database on Mac. The result was then deployed as a Docker container on a Linux server hosted on Microsoft Azure. Pretty cool, if you ask me.

Debugging in Visual Studio Code
Debugging in Visual Studio Code

Visual Studio 2017

The upcoming release of Visual Studio got its name – Visual Studio 2017. The release candidate version (RC) is available now on

The new Visual Studio has been slimmed down and with the new modular installer you can install the IDE much faster with exactly the features you actually need. It is also very easy to later add new features or remove them as you see fit.

The IDE itself is substantially faster (and fluider), in many cases by an order of magnitude compared to 2015.

Visual Studio 2017 brings many improvements across the board.

Starting with the improved start page, with easier access to active repositories and recently opened solutions.


A welcome addition is the ability to edit .csproj project files right inside Visual Studio without having to unload the project.

Navigation features were also improved. The Find All References dialog for example now offers a cleaner hieararchical  preview of all found references.

findallrerencesCode blocks are now marked with Structure Guide Lines. Hovering the mouse over them gives you a hint of which code block they belong to. This substantially improves code readability.

structure_visualizer_cs_tooltipVisual Studio Extensions dialog was updated as well and allows for batch installations and updates of extensions without multiple restarts of the environment. Built-in is also the Roaming Extension Manager, which shows you the extensions you are using on other devices, but have not installed locally, yet.

The Extension manager is now also able to alert you when some extensions are slowing Visual Studio down and you can therefore resolve performance issues much more easily.

Extremely intriguing is the new Live Unit Testing feature of Visual Studio Enterprise 2017. This allows you to display the results of unit tests and code coverage in real-time while you code. After making changes to a code snippet, Visual Studio will automatically run the related Unit Tests in the background and will show the results using indicator on the left margin of the code. As far as I know, only nUnit offered this feature up until now and it is great to see it integrated into Visual Studio.

Exception handling was also substantially improved. The new dialog window offers more useful information about the exception.


For the full list of changes in Visual Studio 2017 RC see the Release Notes on the Visual Studio website.

Visual Studio for Mac

One of the biggest surprises of this year’s Connect(); (well, at least if you hadn’t seen the leaked announcement on a Microsoft blog 🙂 ) was the special version of Visual Studio for macOS.

Visual Studio for Mac brings developers the best IDE for Xamarin iOS and Android app development and ASP.NET Code web app development on Mac.


Preview version is available for you to try out now. Final release of the product will be free as part of the Visual Studio subscription. A free Community edition will also be available.


With Xamarin developers can build native mobile apps in C#. The platform is used by thousands of developers and companies all over the world. Thanks to the Microsoft’s acquisition of Xamarin in February both companies have been now working even closer together.

The open-source Xamarin.Forms framework is getting a lot of attention. This frameworks allows you to build cross-platform apps, which share not only the business logic in C#, but also the user interface (UI) in XAML.

In Visual Studio 2017 you will find the long awaited Xamarin Forms Previewer, which provides live rendering of XAML interface. You will no longer have to enter the inconvenient “change-and-run” loop and you will get immediate feedback on your edits.

xamarinpreviewerWith the new Xamarin Inspector you can browse and edit XAML hierarchy of a running app. The tool can display a 3D model of the layers the app consists of. Every change can be persisted to the source code as well.

xamarininspectorRemote iOS Simulator for Visual Studio Enterprise is now stable. You can now easily test your iOS apps without leaving Visual Studio on Windows. This puts an end to the endless spinning between PC and Mac. Your chair will be grateful 🙂 .

simulatorNew tools also offer easier ways to debug your app and the backend simultaneously.

Many developers will also be pleased to know that Samsung is now contributing to Xamarin and has announced support of .NET Core for Tizen. This open-source operating system is built on Linux and runs on more than 50 million connected devices ranging from wearables, through home appliances to TVs. Xamarin.Forms now contains experimental support of Tizen, including the Visual Studio emulator.

Universal Windows Platform

UWP apps were not left behind with the Visual Studio 2017 update and got quite a few nifty improvements.

The .NET Native compiler received over 600 bug-fixes and improvements and brings even better performance and optimizations to UWP apps.

Application Manifest Designer now has a completely redone Visual Assets page. The new layout gives you an option to automatically generate image assets of all sizes based on one single image file. This is much easier than to manually create the appropriate sizes with the right padding around the image.

manifestvisualassetgeneratorNew diagnostic tool UI Analysis helps you identify XAML problems that could lead to hindered performance and usability of the application.

XAML Designer offers a color theme and high-contrast options for its preview. Also, the new Edit & Continue feature allows you to tweak XAML markup while the app is running. The changes are not only displayed live in the app, but can also be persisted.


IntelliSense is now also finally able to offer suggestions with the {x:Bind} syntax and can add missing namespaces automatically.

intellisense_without%20namespaceIf you use Appium, you can take advantage of improved UI testing of UWP apps. Using the Windows Application Driver can the test project launch and interact with your UWP app and perform your defined tests.

Visual Studio Mobile Center

Building a great mobile app requires in addition to its development also testing, distribution and monitoring. The new Visual Studio Mobile Center aims to help you with these tasks.

visual-studio-mobile-center2This cloud service, now available as a invite-only preview covers the whole mobile app lifecycle.

Currently the following features are present:

  • Build – continuous integration and release management
  • Test – automatic testing on real devices (using Xamarin Test Cloud)
  • Crash reporting – crash analytics in real time
  • Distribution – deployment to users and testers
  • Analytics – business and usage metrics
  • Authentication – integration with different authentication providers
  • EasyTables – easy cloud data storage

visual-studio-mobile-centerThe service supports Android and iOS apps written in Objective-C, Swift, Java, Xamarin and React Native. Support of UWP and Cordova apps is planned in the near future.

In addition to the website interface you can access all features of VSMC using its powerful REST API.

Microsoft Azure

Microsoft is trying to achieve maximum flexibility for customers with its cloud offerings. Azure has now 38 regions over the world (which is more than Google and AWS combined), more than 100 datacenters and is the only certified cloud offering in China. 90% of Fortune 500 companies is now using Microsoft Cloud and Azure adds 120 000 users monthly.

Docker is getting first-class support in Azure and Visual Studio. Services like Azure App Service can be easily integrated with Docker. Developers will be pleased to know that creating, testing and deployment of apps in Docker containers is just a few clicks away with the Visual Studio Tools for Docker. Visual Studio even allows debugging of code in multiple containers at the same time. Finally, Docker is now supported in Visual Studio Team Services continuous integration.

image_8220c68d-c750-43a9-9fd6-21af02268cadAzure Application Insights (web app analytics) and Team Foundation Server 2017 reached General availability (GA).

Azure Functions is a new Azure service, which allows you run code based on events (not only Azure-based, but also from third-party services or on-premise systems). The whole infrastructure is fully abstract, so your only job is to select an event you want to respond to and write the code that should be executed. You can write your event handler in JavaScript, C#, Python and PHP or use Bash, Batch or PowerShell scripting. The service scales automatically based on the incoming traffic and you pay only for the actual processing time.

azurefunctionsSQL Server 2016 is now for the sixth year in a row the safest database system. It offers advanced business intelligence (BI) analytical tools at a fraction of the price of competition. With the announced Service Pack 1 are these analytical features added to all editions of SQL Server – including the free-of-charge Express edition. A preview of SQL Server for Linux was also announced at Connect();, with Docker support, of course.

Azure Bot Service, now in GA, offers cloud-based Conversations-as-a-platform functionality. The services gives you the opportunity to build intelligent conversational bots for Skype, Slack, Facebook Messenger, Microsoft Teams and more. Everything is scaled automatically based on traffic.

Azure Data Lake Services are a new enterprise-grade service in GA, which offers effective storage and processing of enormous amounts of data.


Two years ago, .NET became open-source on GitHub and its community has been incredibly active and vibrant since then. Over 60% contributions to .NET Core has come from community.

Independent .NET Foundation organization supporting the open development and collaboration in the .NET ecosystem currently maintains over 400 repositories on GitHub and its Technical Steering Group consists of companies like RedHat, Samsung, JetBrains and Unity (and Microsoft, of course). What no one expected however – Google is now also becoming a member of .NET Foundation.

.NET Core 1.1 was released. It includes over 1 300 new APIs, better Azure integration and many performance enhancements. These are most prominently aparent in ASP.NET Core, which is now the tenth fastest web framework in the plain-text test from TechEmpower and was able to handle 1 822 366 requests per second. This is 850 times more than ASP.NET two years ago – an unbelievable achievement.

aspnetcoreperformance_techempower-f46b4c14f6f3bbaeNew version of MSBuild supports new version of the .csproj format, which is much simpler and more readable. Not a single GUID is required and the source-code files can be included in the project automatically using wildcard characters. This means the end of the oh-so-hated project file source control merge conflicts.


Connect(); //2016 was clearly the biggest yet. Whatever you are building, the new tools from Microsoft are here to help you do more and achieve more.

Visual Studio 2017, Visual Studio for Mac and Visual Studio Code bring the best IDEs for every opportunity and users on any operating system. With Xamarin it is the best place for mobile app development. Hand in hand with the Visual Studio Mobile Center cloud service you get the best means to cover the whole mobile application lifecycle.

Azure does keeps getting better with Docker, new Azure Functions, Azure Bot Service and Azure Data Lake Services.

Open .NET Core has sparked the interest of Google and Microsoft has become a platinum member of the Linux Foundation.

If you haven’t had a chance to watch Connect(); //2016 live, be sure to check out the on demand sessions, available at Channel9 and try out all the cool stuff that was announced.

Happy coding!


Getting feedback from users in UWP apps via Feedback Hub

Feedback Hub in Windows 10 allows users to openly and effectively share their ideas and report issues. Now Microsoft is adding third party apps into the Feedback Hub and developers can hence receive feedback from users directly.

How can you give the users a quick link to the Feedback Hub for your app? It’s simple! Use the new, rather mouthful, Microsoft Store Engagement and Monetization SDK.

Integrating the Store Engagement SDK

Microsoft Store Engagement and Monetization SDK is a new Visual Studio extension that encompasses both, previously separate, Microsoft Advertising SDKs (Advertising SDK and Advertising Universal SDK) and a new Store Engagement SDK.

To install the SDK in Visual Studio, navigate to Tools menu and select Extensions and Updates. In the left pane of the opened dialog select Online section and then enter the name of the SDK in the search box in the upper right corner of the window. The search should offer you the SDK with an Install button. The installation might require you to restart Visual Studio afterwards.


Now you have the prerequisite ready and you can add the Store Engagement SDK to your UWP project.

Open your solution and right click the References item under your UWP project node in Solution Explorer. The select Add Reference in the menu. The Reference Manager will open. Select Universal Windows > Extensions section and you will see the Microsoft Store Engagement SDK in the list of installed extensions. Check the checkbox on the left to include the SDK in your app.

Adding the Store Engagement SDK reference

Now we are ready to get feedback! The code to open the Feedback Hub is extremely simple and straightforward:

This line of code will launch the appropriate URI registered with Feedback Hub with deep link to the section related to your app. Please note, that this actually works only after you publish the app in the Windows Store (as only then the app ID is valid).

Word of caution

Because this functionality is very new, it does not always work as expected (or not at all – for example on the current Windows Mobile preview build) I always recommend providing a secondary way for users to send feedback – such as via e-mail. This will ensure that you will not miss out on important information you need to improve your apps and will keep all users happy.

WinRT gotcha – “one shot” Timer BackgroundTask does not unregister after the “one shot”

First up – sorry Jack Reacher fans, this post is not about the novel 🙂 .

In my latest Windows 10 app Event Countdowns I made a very unlucky mistake. When registering its Background Task that should update the app’s tiles every 30 minutes, I used the following code:

At first glance, nothing out of the ordinary. Or so I thought. One day after the app was released, I checked my pinned tile counting down to the premiere of Captain America: Civil War to find out with my immense surprise, that the time left on the tile was off by a day! I immediately checked the code and after a few minutes of intense debugging frenzy found the hidden evil – the second parameter of the TimeTrigger class’ constructor.

The second parameter, oneShot, specifies, whether the task will be triggered only once (value true) or periodically (value false).

My course of action was to just change true to false and because the app worked well when tested on my PC, I published the updated version to Store.

When the update arrived on my phone, I happily installed it, launched it and waited for the tiles to become “live” again. So I waited. And I waited. And I waited. And… nothing.

I was lost. The app worked perfectly on my PC and but tiles just didn’t update on my phone. So I went back to the drawing (Visual) board (Studio) and thought it all through again.

And then I saw it.

I naturally presumed, that once the oneShot Background Task is triggered, it is automatically unregistered by the system. In fact, that is not the case.

Once a oneShot trigger runs the Background Task, the task still stays registered!

This means that when I installed the updated app on my phone and run it, the if check for task != null  evaluated to true, because the task was still registered, although it has already fired once!

The final solution was then to force unregister the existing task to make sure the task is registered again with oneShot set to false.

The bug is finally captured and tiles live on!


How to fix Visual Studio shortcuts when ReSharper doesn’t play well

Let me say this – ReSharper is a wonderful and almost indespesable tool for C# development. The improved IntelliSense features and automatic using statements are themselves worth having it installed. But sometimes it stops playing well with Visual Studio keyboard shortcuts. Quite often shortcuts like Ctrl + F (Quick Find) shortcut stop working when Resharper is first installed on a PC with non-US default keyboard.

Some keyboards require different ways to write things like braces and similar. For example on the default Czech keyboard, you have to press Alt Gr + F to write the left square bracket ( ‘[‘ ). Somehow, Resharper for some accidental reason assigns the command it uses for containing declaration (which is normally written as Ctrl + [) to Ctrl + F leaving out the Alt Gr modifier. This way the shortcuts using these unusual characters get broken.

When you find yourself in such a situation, you can luckily fix it quite easily! First change your Windows keyboard layout to US. Then open Visual Studio and opent the Options dialog via the Tools menu. From the left hand pane select Keyboard. Here select the keyboard mapping scheme you prefer (usually ‘(Default)’) and click the Reset button, confirm with Yes and close the options dialog by clicking OK.


Now you probably want to also recover some of the useful ReSharper keyboard shortcuts (no one with ReSharper installed could just live without the all-mighty Alt + Enter shortcut!). You can do just that by going to the ReSharper menu, choosing Options, navigating to Keyboard & Menus and then simply select your preferred shortcut override, click Apply Scheme and Save changes. Now you can try out the command which was broken before and confirm it works well.


Now you can safely go back to the keyboard layout of your choice and the commands will be at your service.

WinRT KeyDown fired twice when Enter is pressed

I have noticed a very unusual oddity which occurs when handling the KeyDown event. When the user hits the ‘Enter’ key, the event is actually fired twice (at least this is the case for TextBox  and PasswordBox  controls on which I have noticed this behavior).

Consider the following code snippet:

What will actually happen when the user actually presses the ‘Enter’ key in the TextBox ?

As you would expect, the event is fired first time and frame navigates to SomeOtherPage . But right after the execution of the handler finishes, it is called once again with the exact same arguments! The code will get executed again and the frame will once again navigate – which is (probably) not what you actually needed!

This behavior is really connected only with the ‘Enter’ key and it does not seem to be present for other keyboard keys. Luckily the workaround is simple:

By setting KeyRoutedEventArgs ‘ Handled Property to true we are essentially stopping subsequent bubbling of the event higher up the tree, but this also prevents the event to fire again on the same control.

I have reported this issue in the Windows Feedback app for Developer Platform. If you want to support its resolution in future versions of UWP, vote for it by clicking here.

How to show touch keyboard on touch interaction with WPF TextBoxes

Updated November 2016 – .NET Framework 4.6.2

Windows Presentation Foundation (WPF) apps have a bit harder life in the touch-enabled world. In WinRT apps, the touch keyboard shows up automatically when a text field gets focus so that the user can type without the need of a classic keyboard (no interrupting of her touch workflow). For classic desktop apps the situation differs – TextBoxes don’t cause the touch keyboard to appear and the user has to open it manually. That is obviously very cumbersome.

Hey! How can I get you to my WPF app?

There are two different workarounds for this problem.

The hack-y way

The first solution is quite a bit of hacking. This requires us to turn off the inking support for our WPF app and actually force the system to behave the right way. You will need some COM import and call native Windows API. This process is extremely well described here on Brian Lagunas’ blog and I encourage you to try it out. If it works for you, great!

The disadvantage of this solution, that I discovered, is that it interferes with touch “panning” of ListBox controls. Any try to do touch panning only fires ItemClick events on the hovered items and the user needs to scroll using the small scroll bar and that is more than inconvenient.

The simple, but more manual way

To overcome the issues that come after disabling inking support in your WPF app, we can go with a simpler but less automatic solution. We will extend the TextBox control and change its behavior when it gets touch focus.

So how does this work?

When the TextBox receives focus after the user enters it with touch, the GotTouchCapture event is called. In this event we can manually start up the process of touch keyboard. The touch keyboard is just a classic desktop application that lives on the path “C:\Program Files\Common Files\Microsoft Shared\Ink\TabTip.exe”.

This solution is very simple and doesn’t require any “hacking” per-se. The only disadvantage is that you as the developer have to ensure, that you use this modified version of TextBox control every time you need to get the right touch-based behavior.

Killing the process

A logical extension to this is to kill the touch keyboard process when it is no longer needed – the input loses focus. The Process.Start( string ) method returns an instance of Process class which provides a Kill() method that will terminate the process when called.

First we need to store the process instance in a private field of the TextBox:

Now we wire up the LostFocus event:


Update – Windows 10 way

In Windows 10, this becomes much less of a problem thanks to the new Tablet mode and settings.

Tablet mode

tablet-modeThe newest version of Windows brings a new mode called Tablet mode, which can be turned on via the Action center or in Settings app, and which is optimized for touch first usage. While some see the way it works as a downgrade opposed to Windows 8.1, it presents much more inuitive integration of both new Windows Store apps and classic desktop applications. Each app defaults to full-screen while preserving the multitasking option of two apps side-by-side. Another nice consequence of turning the Tablet mode on is that the touch keyboard is automatically triggered every time any text field gets focus, no matter the type of application. This undoes the need to launch the touch keyboard manually and lets the operating system take the wheel and ensure everything is handled corretly. The only disadvantage as opposed to the modern applications is the fact, that keyboard doesn’t shift nor resize the app window and overlays it (even in case it is pinned to the bottom of the screen). This means, that some content may become invisible (for example tooltips or context menus).

Outside of Tablet mode

But what about the case when you, for some reason don’t want the Tablet mode on but still want to enjoy the automatic handling of text input by the operating system? A inconspicuous setting can make just this happen!

Open the Settings app, go to Devices category and select Typing – here scroll down and you will see a setting that is by default turned off (for some reason, I can’t really understand why) – to show the touch keyboard in case of input while no keyboard is attached. This is the perfect solution for most cases and makes using all apps with touch a very pleasant and consistent experience.


Updated – .NET Framework 4.6.2

In August 2016 Microsoft announced a new update of .NET Framework 4.6.2. In addition to a very useful addition of Per-Monitor DPI for WPF, this update also addressed the problem with touch keyboard.

WPF apps targeting the new version of the framework support automatic invocation and dismissal of the touch keyboard, matching the behavior of UWP apps on Windows 10. That means you don’t have to make any additional changes to your new apps to support the touch keyboard.