Skip to content

File Dialog messages that contain \r\n render the \r\n as text #977

@mjjames

Description

@mjjames
  • .NET Core Version: 3.0.0-preview6-27804-01
  • Windows version: Windows 10 Build 18917.rs_prerelease.190607-1942 and Windows 7 sp1
  • Does the bug reproduce also in WPF for .NET Framework 4.8?: No

Problem description:
When you use an Open File Dialog and provide an invalid file OR if you use a Save File Dialog and try to overwrite an existing file the messagebox renders the \r\n as text instead of a line break.

This happens if you use the Microsoft.Win32 base implementations or the System.Windows.Forms varients

Actual behavior:
image

Expected behavior:
image

Minimal repro:

var saveDialog = new Microsoft.Win32.SaveFileDialog
{
	OverwritePrompt = true
};
var success = saveDialog.ShowDialog();
var saveDialogForms = new System.Windows.Forms.SaveFileDialog
{
	OverwritePrompt = true
};
var successForms = saveDialog.ShowDialog();

Metadata

Metadata

Assignees

Labels

BugProduct bug (most likely)rank20Rank: Priority/rank on a scale of (1..100)regressionstatus: This issue is a regression from a previous build or release

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions