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
(For what it's worth, it would be great if <Setter Property="Width" Value="60" /> could instead be <Width>60</Width> but I understand that XAML doesn't work that way at all at the moment. However, I think that's an interesting notion - could an object (like Setter) be instead replaced by a tag that isn't itself an object but is instead just parameters? That'd be neat.)
Of course, BorderRadius isn't a property of Button. But what I suspect you're doing is you're trying to say "Look at all the stuff you have to do to change a template" but then what you show as "expected" does not look like it could result in a changed template.
So kind of not really comparing fairly. Again, apples to oranges.
But for sure, when you do have to create a new Template, it gets very verbose. If you wanna propose something that would make it less so, I think you would need to show something that looks like it could actually create a template.
Also, I don't wanna exactly, you know, go all "language wars" or anything, but in my opinion:
CSS is verbose.
CSS is illogical.
CSS is hard to read.
But I'm not talking about "Color: Red" - I'm talking about when you have to write multiple nearly identical classes for lack of inheritance with -vendor-specific-tags whose values are like "split-inline-float" and you've got "clear: both" and !important randomly sprinkled throughout. I feel like CSS is an absolute nightmare once you move at all past the basics.
So ... you know, there's that haha.
I mean if you like CSS good on ya, but not everyone necessarily thinks it's awesome.
Reacted by workgroupengineering, lindexi, guidevnet, Jarrow, horeaper, Burak Kaan Köse, Nour, Kacper Tryniecki, xzbaijj, Jim Vakos and 2 more
Oh for sure. As of 17763, I should note, "CornerRadius" is a property that's available on all Controls, and can be used for rounding corners.
I think there's definitely room for improvement in what Styles can do as well. I think a big pain point is that it's extraordinarily hard to style just one part of a template. Like either the control author creates a bunch of "Inner" style properties, or you have to remake the whole template. Also, just XML verbosity is a thing in general.
So here's to hoping that at least some verbosity can be mitigated a little.
But it is not an issue of XAML and adding CSS as you suggested, won't add more. As for corner radius there were a discussion to create ICorner interface which will be applied to all controls that support rounded corners
I think you might need to go back and go over a few of the finer points on MAUI and Xamarin... One of the amazing parts about it is that nearly everything is extensible.... soooo if it doesn't have enough or the right bindings for you, boom add more and sub a pr on it... If it's solid and doesn't cause issue's then it will get incorporated into the base...
And or I would take a look at css / xaml integrations and how they interact with each other... because there has been a long-standing prop on this that just never gained major traction in the community to make them a more linear feel. Furthermore, this MIGHT be the right time to revisit that or soon™ because of the roadmap of incorporation of bBlazor as a project type.
But I will say that personally as a long-time Xamarin guy and it is the language of choice... If you are finding yourself doing ALOT of this stuff all over the place... you might need to think over a few things on page structure because unfortunately, the verbosity will not go away. I can think of a half dozen things that would go fubar lowering it, just due to the ways data binding's work..
Yes, I wanted XAML to open up more styles to components to reduce the amount of code
You incorrectly understand what xaml does. It is just a markup language. All component properties created in behind as BindableProperty which than used to setup native components in Renderers
Activity
VladislavAntonyuk commentedon Dec 15, 2020
You already can use css to customize your controls. Also xaml is based on xml, so it should have xml syntax
mandalorianbob commentedon Dec 15, 2020
You're kind of comparing apples to oranges here. Based on your "Expect version 1" your first style should look like this:
Now that's not really that bad.
(For what it's worth, it would be great if
<Setter Property="Width" Value="60" />could instead be<Width>60</Width>but I understand that XAML doesn't work that way at all at the moment. However, I think that's an interesting notion - could an object (like Setter) be instead replaced by a tag that isn't itself an object but is instead just parameters? That'd be neat.)Of course, BorderRadius isn't a property of Button. But what I suspect you're doing is you're trying to say "Look at all the stuff you have to do to change a template" but then what you show as "expected" does not look like it could result in a changed template.
So kind of not really comparing fairly. Again, apples to oranges.
But for sure, when you do have to create a new Template, it gets very verbose. If you wanna propose something that would make it less so, I think you would need to show something that looks like it could actually create a template.
Also, I don't wanna exactly, you know, go all "language wars" or anything, but in my opinion:
CSS is verbose.
CSS is illogical.
CSS is hard to read.
But I'm not talking about "Color: Red" - I'm talking about when you have to write multiple nearly identical classes for lack of inheritance with -vendor-specific-tags whose values are like "split-inline-float" and you've got "clear: both" and !important randomly sprinkled throughout. I feel like CSS is an absolute nightmare once you move at all past the basics.
So ... you know, there's that haha.
I mean if you like CSS good on ya, but not everyone necessarily thinks it's awesome.
JHeLiu commentedon Dec 16, 2020
Maybe you're right, but it would be nice if XAML opened up more property Settings, like rounded corners
mandalorianbob commentedon Dec 16, 2020
Oh for sure. As of 17763, I should note, "CornerRadius" is a property that's available on all Controls, and can be used for rounding corners.
I think there's definitely room for improvement in what Styles can do as well. I think a big pain point is that it's extraordinarily hard to style just one part of a template. Like either the control author creates a bunch of "Inner" style properties, or you have to remake the whole template. Also, just XML verbosity is a thing in general.
So here's to hoping that at least some verbosity can be mitigated a little.
JHeLiu commentedon Dec 16, 2020
XAML just has too few properties available, hopefully more and more in the future, and I'm eager to give this UI framework a try
VladislavAntonyuk commentedon Dec 16, 2020
What do yo mean “too few properties”?
JHeLiu commentedon Dec 16, 2020
Some components have too few styles @VladislavAntonyuk
VladislavAntonyuk commentedon Dec 16, 2020
But it is not an issue of XAML and adding CSS as you suggested, won't add more. As for corner radius there were a discussion to create ICorner interface which will be applied to all controls that support rounded corners
jamesmcmenamin commentedon Dec 16, 2020
I think you might need to go back and go over a few of the finer points on MAUI and Xamarin... One of the amazing parts about it is that nearly everything is extensible.... soooo if it doesn't have enough or the right bindings for you, boom add more and sub a pr on it... If it's solid and doesn't cause issue's then it will get incorporated into the base...
And or I would take a look at css / xaml integrations and how they interact with each other... because there has been a long-standing prop on this that just never gained major traction in the community to make them a more linear feel. Furthermore, this MIGHT be the right time to revisit that or soon™ because of the roadmap of incorporation of bBlazor as a project type.
But I will say that personally as a long-time Xamarin guy and it is the language of choice... If you are finding yourself doing ALOT of this stuff all over the place... you might need to think over a few things on page structure because unfortunately, the verbosity will not go away. I can think of a half dozen things that would go fubar lowering it, just due to the ways data binding's work..
JHeLiu commentedon Dec 16, 2020
Yes, I wanted XAML to open up more styles to components to reduce the amount of code
jamesmcmenamin commentedon Dec 16, 2020
And @JHeLiu rounded corners are suuuper cake... James Montemagno has a blog some were on them.
And or you could just have elements x/y/z have rounded corners if you put together a layout/parody pack.
See Visual = Material for some solid examples of layout/parody pack
VladislavAntonyuk commentedon Dec 18, 2020
You incorrectly understand what xaml does. It is just a markup language. All component properties created in behind as BindableProperty which than used to setup native components in Renderers
xzbaijj commentedon Jan 12, 2021
css and html are very Bad language!Because they are not rigorous
JHeLiu commentedon Jan 13, 2021
@xzbaijj Yes.