-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modernize C# FolderBrowserDialog example #9650
Conversation
Update the C# example for the FolderBrowserDialog class to use MenuStrip, MenuStripItem, etc. classes instead of the deprecated MainMenu and MenuItem classes.
@dotnet-policy-service agree |
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Varriount
Can you address the suggestion I made? Once that's done, the build should complete successfully, and I'll merge this PR.
Also, in order for the CI build to pass, you need to add a .csproj
file so the project builds. Since this is a desktop example, it will need a Visual Studio project, and a snippets.5000.json
config file to specify Visual Studio as the build engine. There are several in this repo that you can copy to the project.
snippets/csharp/System.Windows.Forms/FolderBrowserDialog/Overview/form1.cs
Show resolved
Hide resolved
Learn Build status updates of commit 4a2e71b: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
@Varriount Can you add the project file as well? Something like this one: dotnet-api-docs/snippets/csharp/System.Windows.Forms/KeyPressEventArgs/Handled/Project.csproj Line 6 in b09228a
(You don't need the snippets5000.json file that Bill mentioned.) |
Learn Build status updates of commit 079f31e: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
Update the C# example for the FolderBrowserDialog class to use MenuStrip, MenuStripItem, etc. classes instead of the deprecated MainMenu and MenuItem classes. Also make a few changes with regards to trailing spaces and formatting.
I left the names of all the variables, etc. the same so that it would differ too much from the other examples (and also because adding
ToolStrip
to the variable names wouldn't really justify the length increase).