dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.89k stars 4.01k forks source link

mbox shortcut changes in WPF #38919

Open vsfeedback opened 4 years ago

vsfeedback commented 4 years ago

This issue has been moved from a ticket on Developer Community.


In WPF/C#, I used mbox shortcut. At that time, this code was inputed.

System.Windows.Forms.MessageBox.Show("Test");

But I want to enter the code below in WPF.

System.Windows.MessageBox.Show("Test");

or

using System.Windows;
// Some Code
MessageBox.Show("Test");  // Where I used shortcut


Original Comments

Jane Wu [MSFT] on 5/5/2019, 03:20 AM:

Thank you for taking the time to provide your suggestion. We will do some preliminary checks to make sure we can proceed further. We'll provide an update once the issue has been triaged by the product team.

Kendra Havens [MSFT] on 9/27/2019, 11:03 AM:

Thank you for filing this feedback! I'm going to move this to our open source repository on GitHub for further discussion with the community.

miloush commented 4 years ago

Since both System.Windows and System.Windows.Forms are included by default in the respective project, perhaps just inserting unqualified MessageBox.Show would do the trick. And if used elsewhere, the add using quick fix can fix it easily.

Otherwise, I think this is easy enough to solve by users themselves (i.e. editing the snippet or creating your own).

sharwell commented 4 years ago

Blocked on #31879