feat: Enable Grid to dynamically switch layouts#4472
feat: Enable Grid to dynamically switch layouts#4472nandin-borjigin wants to merge 1 commit intoCommunityToolkit:mainfrom
Conversation
|
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 🙌 |
|
|
|
Hi @nandin-borjigin, it appears you're trying to merge this code in from the main/master branch of your forked repo. Please be aware of the rules & stipulations of submitting code into the Toolkit repo: |
|
@nandin-borjigin appreciate your enthusiasm! It'd be good for us to get some feedback from the community on your proposal. We should hopefully have a new process for prototypes and experiments like this in the next few weeks that would be good to help hone your idea. I noticed that you had a string based |
|
Closing since the PR was made from main branch of forked repository. New PR is made #4474 . @michael-hawker I'll add comments in the code for your question :). Thanks. |

Fixes #4470 CommunityToolkit/Labs-Windows#232
Added attached properties to
Gridelement to enable dynamic layout switching.PR Type
What kind of change does this PR introduce?
Feature
What is the current behavior?
We cannot switch
Gridlayouts 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 aGridelement and switch among them using the newly addedGridExtensions.ActiveLayout(string, it's the dictionary key of the corresponding layout definition) attached property associated with theGridelement.PR Checklist
Please check if your PR fulfills the following requirements:
Other information
Document will be provided soon while this PR is being reviewed and discussed.