You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
There are many different kinds of controls in the controls package and there are many different levels of abstraction between the controls.
From a technical perspective, users have to pull in the whole package and all its dependencies (like Win2d and xmal.behaviors) just to get access to simple controls (like WrapPanel).
From a perspective of usability, having all our controls grouped together under "controls"
Makes the library as a whole less "understandable" as only a very general theme unifies it and consumers are not introduced to a specific domain.
Makes it harder to find our controls that do address specific domains in collections of packages. As in if a user is searching for a package to help with "layout" related tasks they most likely won't stumble across our package even though we have a substantial group of controls/panels that only address layout.
Describe the solution
Split the controls package.
We can either split things based on their "weight", splitting general/minimally dependent/simple controls from opinionated/heavily dependent/complex controls.
Or split the controls based on the domains or problem spaces they live in. Domains like "Layout", "Input" or maybe "Image capture/creation/examination/manipulation"
Whatever way seems like the best, I want to see the package split up into more focused categories.
We should at least split off a "Layout" package containing most of the controls that are labeled "For Layout" or "Needs content" as most of them are very lightweight and "layout" seems like a very important domain.
Other than the major categories, I'm curious what everyone thinks of having a separate "Panels" package separate from any "Layout" package, as they seem to distinguish themselves as not having any really visual appearance just a strategy for placing children.
Particularly I think AdaptiveGridView, DockPanel, StaggeredPanel, UniformGrid, WrapPanel would be our "Panels" (or whatever we want to name it). But something like the Carousel or the OribitView already has a strong visual style and in comparison to the "Panels" and is more opinionated/less general purpose.
The sample app already has groupings, but not everything listed above shows up in the sample app :/
@mrlacey yeah our Sample App groupings are a bit 'fuzzy' too, so they may need to be restructured based on decisions here. But it could be an interesting thing to evaluate what we did in the past there with this matrix.
Curiously, besides SwitchPresenter was something else missing from the Sample App? (I need to create the sample for that control still it's new for 7.0.)
Curiously, besides SwitchPresenter was something else missing from the Sample App? (I need to create the sample for that control still it's new for 7.0.)
@mrlacey the only one I believe I filed so far is #3578 for the Animations package. I thought it was just RangeSelector and ScrollHeader, so that issue needs more details about what OrbitView and TileControl use.
Other than the major categories, I'm curious what everyone thinks of having a separate "Panels" package separate from any "Layout" package, as they seem to distinguish themselves as not having any really visual appearance just a strategy for placing children.
Particularly I think AdaptiveGridView, DockPanel, StaggeredPanel, UniformGrid, WrapPanel would be our "Panels" (or whatever we want to name it). But something like the Carousel or the OribitView already has a strong visual style and in comparison to the "Panels" and is more opinionated/less general purpose.
I would avoid this unless there is a good reason to have them in separate packages. While breaking into more packages makes each package smaller it also adds complexity to finding and selecting the right package.
As a consumer of the packages I wouldn't want to have to stop and work out (guess) whether I needed Controls.Layout or Controls.Panels. This could get particularly confusing if some controls ending Grid are in the Panels package and some another.
And what about DropShadowPanel? That is all about visual appearance.
I would avoid this unless there is a good reason to have them in separate packages. While breaking into more packages makes each package smaller it also adds complexity to finding and selecting the right package.
I agree with this. UWP has a linker and strips out unused stuff during release compilation with .NETNative. so it's not like having more dependencies is going to bloat your app.
This is more about developer and tooling experience, right? So, where is the balance between having a smaller dependency tree vs needing to search around for the right packages.
@mrlacey good points. We also already have a Microsoft.Toolkit.Uwp.UI.Controls.Layout package as well that's explicitly related to WinUI ItemsRepeater.
Panels would be a tricky sell, especially with DropShadowPanel which isn't really a Panel...
I was thinking probably we'd have names like Base, Core, or Primitives, but those aren't that descriptive in helping find things. That's partly we still want the uber Controls` package which includes them all still to be there. That way knowing what's in each of these sub-packages is more of an advanced optimization step.
I agree with this. UWP has a linker and strips out unused stuff during release compilation with .NETNative. so it's not like having more dependencies is going to bloat your app.
This is more about developer and tooling experience, right? So, where is the balance between having a smaller dependency tree vs needing to search around for the right packages.
@LanceMcCarthy not all the things for XAML get stripped as the XAML metadata hold implicit references I believe; so those benefits aren't as apparent for the Controls package. @vgromfeld has been investigating this and can explain a bit more the technical details. Ref: #3145
@mrlacey the only one I believe I filed so far is #3578 for the Animations package. I thought it was just RangeSelector and ScrollHeader, so that issue needs more details about what OrbitView and TileControl use.
I am putting together a list of their significant dependencies right now, it's clearer than my branches.
@RosarioPulella thought a bit more and decided to take a look at the WinUI categories from their control gallery and try and condense them down:
Input + Date & Time + Text + Status and Info (this last one could also fit in the next bucket though there's some overlap)
Menus & Toolbars + Dialogs & Flyouts
Collections + Layout + Navigation + Scrolling
Media (though we already use Media for Win2D)
We kind of use a similar split in our Sample App. Wondering if we could get a cleaner split of taking the rest of our stuff beyond Primitives and Media and segmenting it into 3: Input, Layout, and 'Chrome'?
Not sure what to call the last one. It's almost like Adornments... but that means something else from WPF/XAML land.
I'm also wondering if we just add to the existing Layout package if we plan to end-up with the WinUI dependency in the future anyway...
Let me know any thoughts you have in the morning and we'll sync during the day to figure out a plan for the week.
Yeah, InAppNotification, Menu, and TextToolbar would be in 'Chrome' as well. Wonder if we just call that the 'Core' package and just pull out the Layout and Input items?
Well as far as categorization, its always easiest to have a "Un-catogrized" bucket. While Its would be hard to figure out whats in "Core" from the name I think its worth splitting the others controls out. Also if there was no "Other"-ish bucket then it would be a bigger barrier to entry for contributes. If contributors want to add a control and it does not fit in one of the established categories, they would have an easier time just adding it to "Core" than creating a new package. If a new control should be in a different or new package and they try to add to "Core" we can help them from there, rather then them having to deal with that thought process upfront and possibly on there own.
If a new control should be in a different or new package and they try to add to "Core" we can help them from there, rather then them having to deal with that thought process upfront and possibly on there own.
Yeah, and part of this would be sorted out in an initial discussion/issue before we get to a PR.
I think the last part is if we want to have two different 'Layout' packages or re-use the one we have. My only concern is that the current Layout package is pretty specific and small as there's no XAML bits...
Something to think about... We now have a 'Primitives' package, but we had also put some helper bits in a 'Controls.Primitives' namespace (like the ColorPickerSlider)...
How do we reconcile?
Should our 'Primitives' package be a more aptly named 'Styleless' or do we change the namespace to be something else???
@RosarioPulella they'll all stay in the Controls namespace, as the point of the uber-Controls package is that if you're just getting started you don't know that they're all in sub-packages. The sub-packages are really just a later step for app developers to optimize package sizes later.
I'm wondering if we just move the ColorPickerSlider to the main namespace but add the Browsable/EditorBrowsable component attributes to hide it from the editor?
Activity
Rosuavio commentedon Dec 4, 2020
I should mention my personal thoughts are that
michael-hawker commentedon Dec 4, 2020
@LanceMcCarthy pointed us to the Xamarin Forms breakdown here: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/controls/views
This has Expander as more of a 'Content' control/View vs. a Layout specifically.
Wonder if we want to be more fine-grained with 'Needs Content' to be a specific 'Content' vs. 'Items'?
mrlacey commentedon Dec 4, 2020
The sample app already has groupings, but not everything listed above shows up in the sample app :/
Rosuavio commentedon Dec 4, 2020
Other than the major categories, I'm curious what everyone thinks of having a separate "Panels" package separate from any "Layout" package, as they seem to distinguish themselves as not having any really visual appearance just a strategy for placing children.
Particularly I think
AdaptiveGridView,DockPanel,StaggeredPanel,UniformGrid,WrapPanelwould be our "Panels" (or whatever we want to name it). But something like theCarouselor theOribitViewalready has a strong visual style and in comparison to the "Panels" and is more opinionated/less general purpose.michael-hawker commentedon Dec 4, 2020
@mrlacey yeah our Sample App groupings are a bit 'fuzzy' too, so they may need to be restructured based on decisions here. But it could be an interesting thing to evaluate what we did in the past there with this matrix.
Curiously, besides
SwitchPresenterwas something else missing from the Sample App? (I need to create the sample for that control still it's new for 7.0.)mrlacey commentedon Dec 4, 2020
just
SwitchPresentermrlacey commentedon Dec 4, 2020
Are there separate plans (& issues) for trying to remove the dependencies? If there are alternatives?
michael-hawker commentedon Dec 4, 2020
@mrlacey the only one I believe I filed so far is #3578 for the Animations package. I thought it was just
RangeSelectorandScrollHeader, so that issue needs more details about whatOrbitViewandTileControluse.mrlacey commentedon Dec 4, 2020
I would avoid this unless there is a good reason to have them in separate packages. While breaking into more packages makes each package smaller it also adds complexity to finding and selecting the right package.
As a consumer of the packages I wouldn't want to have to stop and work out (guess) whether I needed
Controls.LayoutorControls.Panels. This could get particularly confusing if some controls endingGridare in the Panels package and some another.And what about
DropShadowPanel? That is all about visual appearance.LanceMcCarthy commentedon Dec 4, 2020
I agree with this. UWP has a linker and strips out unused stuff during release compilation with .NETNative. so it's not like having more dependencies is going to bloat your app.
This is more about developer and tooling experience, right? So, where is the balance between having a smaller dependency tree vs needing to search around for the right packages.
michael-hawker commentedon Dec 4, 2020
@mrlacey good points. We also already have a
Microsoft.Toolkit.Uwp.UI.Controls.Layoutpackage as well that's explicitly related to WinUI ItemsRepeater.Panelswould be a tricky sell, especially withDropShadowPanelwhich isn't really a Panel...I was thinking probably we'd have names like
Base,Core, orPrimitives, but those aren't that descriptive in helping find things. That's partly we still want the uberControls` package which includes them all still to be there. That way knowing what's in each of these sub-packages is more of an advanced optimization step.@LanceMcCarthy not all the things for XAML get stripped as the XAML metadata hold implicit references I believe; so those benefits aren't as apparent for the Controls package. @vgromfeld has been investigating this and can explain a bit more the technical details. Ref: #3145
Rosuavio commentedon Dec 4, 2020
I am putting together a list of their significant dependencies right now, it's clearer than my branches.
Rosuavio commentedon Dec 4, 2020
See #3578 (comment)
14 remaining items
michael-hawker commentedon Feb 1, 2021
@RosarioPulella thought a bit more and decided to take a look at the WinUI categories from their control gallery and try and condense them down:
We kind of use a similar split in our Sample App. Wondering if we could get a cleaner split of taking the rest of our stuff beyond Primitives and Media and segmenting it into 3: Input, Layout, and 'Chrome'?
Not sure what to call the last one. It's almost like Adornments... but that means something else from WPF/XAML land.
I'm also wondering if we just add to the existing Layout package if we plan to end-up with the WinUI dependency in the future anyway...
Let me know any thoughts you have in the morning and we'll sync during the day to figure out a plan for the week.
Rosuavio commentedon Feb 1, 2021
Interesting, so maybe the controls would split into the categories like this?
ColorPicker,RadialGauge,RangeSelector,RemoteDevicePicker,TokenizingTextBoxLayoutTransformControl,HeaderedContentControl,HeaderedItemsControl,ListDetailsView,Carousel,OrbitView,BladeView,Expander,GridSplitterRotatorTile,DropShadowPanel,TileControl,ImageEx,Loading,RadialProgressBar,CameraPreviewWhat about these other controls?
InAppNotification,Menu,TextToolbarmichael-hawker commentedon Feb 1, 2021
Yeah, InAppNotification, Menu, and TextToolbar would be in 'Chrome' as well. Wonder if we just call that the 'Core' package and just pull out the Layout and Input items?
@RosarioPulella thoughts?
Rosuavio commentedon Feb 1, 2021
Well as far as categorization, its always easiest to have a "Un-catogrized" bucket. While Its would be hard to figure out whats in "Core" from the name I think its worth splitting the others controls out. Also if there was no "Other"-ish bucket then it would be a bigger barrier to entry for contributes. If contributors want to add a control and it does not fit in one of the established categories, they would have an easier time just adding it to "Core" than creating a new package. If a new control should be in a different or new package and they try to add to "Core" we can help them from there, rather then them having to deal with that thought process upfront and possibly on there own.
michael-hawker commentedon Feb 1, 2021
Yeah, and part of this would be sorted out in an initial discussion/issue before we get to a PR.
I think the last part is if we want to have two different 'Layout' packages or re-use the one we have. My only concern is that the current Layout package is pretty specific and small as there's no XAML bits...
Rosuavio commentedon Feb 1, 2021
Yeah... And between 'Primitives' and the new 'Layout', The controls in 'Primitives' provides no interactions unlike some of the controls in 'Layout'.
michael-hawker commentedon Feb 4, 2021
Something to think about... We now have a 'Primitives' package, but we had also put some helper bits in a 'Controls.Primitives' namespace (like the ColorPickerSlider)...
How do we reconcile?
Should our 'Primitives' package be a more aptly named 'Styleless' or do we change the namespace to be something else???
@windows-toolkit/toolkitteam thoughts?
Rosuavio commentedon Feb 4, 2021
Well do we eventually want to put our controls in different namespaces for each package?
Split Microsoft.Toolkit.Diagnostics package (#3726)
michael-hawker commentedon Feb 4, 2021
@RosarioPulella they'll all stay in the
Controlsnamespace, as the point of the uber-Controls package is that if you're just getting started you don't know that they're all in sub-packages. The sub-packages are really just a later step for app developers to optimize package sizes later.I'm wondering if we just move the ColorPickerSlider to the main namespace but add the Browsable/EditorBrowsable component attributes to hide it from the editor?