UWP crashes when tapping Pen in TextBox in ContentDialog

Michael Scherotter 1 Reputation point
2020-07-19T19:22:03.88+00:00

In a UWP C# app if I have a TextBox in a ContentDialog and tap inside the TextBox with a stylus (Surface Pen or Wacom Stylus), the app crashes with an unhandled Win32 Exception. I have tested this on a Surface device as well as a desktop with a Wacom One display tablet. The same crash happens if the TextBox is replaced with a RichEditBox control.

private async void OnPressed(object sender, RoutedEventArgs e)
{
    var dialog = new ContentDialog1();

    await dialog.ShowAsync();
}

Content Dialog has no code, just Xaml:

<ContentDialog
    x:Class="ContentDialogText.ContentDialog1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:ContentDialogText"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Title="TITLE"
    PrimaryButtonText="Button1"
    SecondaryButtonText="Button2"
    PrimaryButtonClick="ContentDialog_PrimaryButtonClick"
    SecondaryButtonClick="ContentDialog_SecondaryButtonClick">

    <Grid>
        <TextBox/>
    </Grid>
</ContentDialog>
Universal Windows Platform (UWP)
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.