WindowsCommunityToolkit icon indicating copy to clipboard operation
WindowsCommunityToolkit copied to clipboard

feat: Enable Grid to dynamically switch layouts

Open nandin-borjigin opened this issue 2 years ago โ€ข 2 comments

Fixes #4470 CommunityToolkit/Labs-Windows#232

Added attached properties to Grid element to enable dynamic layout switching.

PR Type

What kind of change does this PR introduce?

Feature

What is the current behavior?

We cannot switch Grid layouts dynamically once it's defined.

What is the new behavior?

One can define as many layouts (dictionary of string to GridLayoutDefinition, a newly added data structure to describe a grid layout) as desired in a Grid element and switch among them using the newly added GridExtensions.ActiveLayout (string, it's the dictionary key of the corresponding layout definition) attached property associated with the Grid element.

1

PR Checklist

Please check if your PR fulfills the following requirements:

  • [ ] Tested code with current supported SDKs
  • [x] New component
    • [x] Pull Request has been submitted to the documentation repository instructions. Link: PR 602
    • [ ] Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
    • [ ] If control, added to Visual Studio Design project
  • [x] Sample in sample app has been added / updated (for bug fixes / features)
  • [ ] New major technical changes in the toolkit have or will be added to the Wiki e.g. build changes, source generators, testing infrastructure, sample creation changes, etc...
  • [ ] Tests for the changes have been added (for bug fixes / features) (if applicable)
  • [x] Header has been added to all new source files (run build/UpdateHeaders.bat)
  • [x] Contains NO breaking changes

nandin-borjigin avatar Feb 02 '22 13:02 nandin-borjigin

Thanks nandin-borjigin for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request ๐Ÿ™Œ

ghost avatar Feb 02 '22 13:02 ghost

This PR has been marked as "needs attention ๐Ÿ‘‹" and awaiting a response from the team.

ghost avatar Feb 03 '22 06:02 ghost