Replies: 1 comment
-
This relates to a new issue I filed against Markup.Declarative, requesting that we provide our own parsing logic (shown above) to enable this tuple-notation. AvaloniaUI/Avalonia.Markup.Declarative#16 But it would be BETTER if Avalonia simply supported this notation natively (with code I provided), and we could just tell Avalonia to parse these tuples for us. (no custom code for us) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Perhaps there is already a notation for this, but in the code, I didn't find it.
The issue I see is that when Grids are inside containers of variable (or unknown sizes), it's OFTEN needed to specify the "MinWidth" to prevent the most important cells from becoming unusable. The current syntax/parsing only allow for parsing the "Width" GridLength. (or Height for Row Definitions).
I think Avalonia should support "tuple-notation" for this, such as:
where:
"(30*, 400)" means "Width = "30*" and "MinWidth = 400"
"(15*, 250, 400)" means "Width = "15*", MinWidth = 250, MaxWidth = 400
"(2)" simply means "Width=2" just to be consistent, and support 1-Tuples.
I have already re-written the parsing logic for these Strings, which is working out dandy for me, using the new "Markup.Declarative" library.
Beta Was this translation helpful? Give feedback.
All reactions