microsoft / WinUI-Gallery

This app demonstrates the controls available in WinUI and the Fluent Design System.
MIT License
2.65k stars 612 forks source link

Added a Scratch Pad page where sample xaml can be loaded #1548

Closed codendone closed 1 month ago

codendone commented 1 month ago

Description

Added a “Scratch Pad” page to the gallery where the user can type in some XAML markup and click the Load button to immediately see the results. This provides a convenient place for experimentation. It can also be used to provide a simple repro for issues which only require loading the right XAML markup.

This change currently adds the “Scratch Pad” page to the “System” group in the navigation pane. This seems like the best fit currently, without a “Tools” section or something else.

Details about the Scratch Pad

Known issues/limitations

How Has This Been Tested?

Tested loading a variety of markup. Tested its ability to save and load small and large markup to app data. Tested the "Toggle Theme" button to ensure it behaves well. Tested with Accessibility Insights to ensure there weren't any issues.

Screenshots (if appropriate):

image

Types of changes

Some possible future improvements

Bonus fix

Removed an unused variable in IconsPage.xaml.cs to remove a compiler warning.

codendone commented 1 month ago

/azp run

codendone commented 1 month ago

/azp run

karkarl commented 1 month ago

Thanks for this PR, I'm very excited for this! We can create a separate NavView Item and put this page under "Tools". This can be in the next PR.