Skip to content

App Crashes When Setting MathML in RichEditBox #5257

@Zakariathr22

Description

@Zakariathr22

Describe the bug

When setting the MathOnly mode for a RichEditBox and then assigning a MathML expression, the application crashes.

Steps to reproduce the bug

  1. Add a RichEditBox to the XAML:
<RichEditBox x:Name="REBox" />
  1. In the code-behind, attempt to set the math mode and apply a MathML expression:
REBox.Document.SetMathMode(RichEditMathMode.MathOnly);
REBox.Document.SetMathML("a^2");
  1. Run the application.

Expected behavior

The RichEditBox should correctly display the given MathML expression without causing a crash.
If the input is invalid, an exception should be handled gracefully instead of causing an application crash.

Screenshots

No response

NuGet package version

Windows App SDK 1.7.0: 1.7.250310001

Packaging type

Packaged (MSIX)

Windows version

Windows 11 version 23H2 (22631, November 2023 Update)

IDE

Visual Studio 2022

Additional context

I found this in the documentation, but I'm not sure if it's the main cause since I don't receive an "access denied" message.

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions