Since this is a UWP application, you can try reinstalling Notepad from Microsoft Store. This will replace the Windows.UI.Xaml.dll file associated with Notepad and may resolve the file corruption or other issues. Open Settings > Applications > Applications and Features. Find Notepad in the list, click on it, and then select Advanced Options.