Replies: 2 comments
-
This could definitely be useful for WinUI3, don't get me wrong -- but I'm a little confused on how this would work/look on other platforms. I think you could pretty easily create a custom element that accomplishes this for Windows, why not go that direction? |
Beta Was this translation helpful? Give feedback.
-
I have now contacted the person who reported #14144 and asked for a more detailed explanation. Simply because I was very interested. For iOS and probably also Android (he wanted to tell me this again), adding a border with the help of a behavior was relatively easy. In iOS, the PlatformView is a UIView to which you can add a border via a separate layer. This is actually quite simple. For Android, it will probably be done in such a way that you have to assign a background shape to the created ViewGroup. Under WinUI, however, there is no possibility to intervene at this point. Overall, the feature request could actually be reduced to WinUI and only make the MAUI Grid from the LayoutPanel to the Grid. Then the use of a Behavior would also be possible without any problems. Conversely, however, it would certainly not be wrong to consider extending the MAUI grid as described so that the rest is done internally in the framework. I think it would be a bit excessive to build a separate control element for this. The entire logic would then have to be implemented manually. This certainly makes sense for certain topics. But this is a topic that could certainly be interesting and important for quite a few people. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
First of all: This may be a feature request rather than a bug.
As in issues #14144 and #15093, I would also like to ask for the following check: Currently, the platform equivalent of a Grid in MAUI is a LayoutPanel in WinUI3. This means that numerous functionalities are lost that would also bring significant improvements to the framework.
Issue #14144 is a perfect example of this. If you currently want to create a border around a grid, this must be defined within a Border element. Theoretically, this would fulfill the requirement. In practice, however, borders are known to lead to a number of performance issues and potential memory leaks. Conversely, the WinUI-native Grid provides exactly this functionality out of the box. You would then only have to pass the corresponding properties to the outside.
In my opinion, you should also think about the use of borders in general and, as far as possible, always check whether individual native elements have a corresponding functionality and pass it through if necessary. Why? Every border means an additional hierarchy level in the view stack. Every nesting of views leads to performance and memory problems. Therefore, unnecessary nesting should be avoided.
Please really think about this again.
Incidentally, it is currently the case that you cannot get a border around a grid using a handler or a behavior under WinUI 3.
Public API Changes
Intended Use-Case
see description
Beta Was this translation helpful? Give feedback.
All reactions