-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Enhancement] FontImageSource defaults and style #6421
Comments
I love this! I am finding myself using the same fonts over and over again making my markup verbose. Creating a default font would be very useful. Could we add the following properties to be defaults as well?
If we make everything have a default except <ImageButton Source="{FontImage Glyph={StaticResource SmileFace}}" /> or even easier <ImageButton Source="{FontImage {StaticResource SmileFace}}" /> |
absolutely, we use statics for our glyphs, so it would look like this. <ImageButton Source="{FontImage {x:Static xaml:Icons.SmileFace}}" /> I'd love to see both of these approved. I'm happy to contribute. |
Would also be nice to be able to use the StyleClass property on FontImageSource. <FontImageSource StyleClass="TrashIcon" /> |
Right now this is really bad because I have to do this on every single fonticonsource: That's highly not fun. |
why can't we add a style to FontImageSource in 2021? 😭 |
Do we know if this will eventually be released? I know MAUI is coming soon and there's likely a lot of higher priority features and fixes being worked on, but being able to globally address FontImageSource Style would really make my life easier for something I'm working on. |
almost 2022 |
Just ran into this shortcoming. So our app has 2 accent colors used here and there throughout the app. I have to allow customers to pick 2 light mode and 2 dark mode accent colors. Since they are dynamic I can't use AppThemeBinding and instead have to create a light Style and a dark Style for every element in our app that uses accent colors. Not ideal but ok. We have a bunch of icons that use the accent colors. Just images with a FontImageSource but I can't use my Style trick to set the color of the icon on the FontImageSource which is just ducky. In case it helps anyone, the way I'm getting around this is to do a sort of dummy converter.
|
We are still waiting for this in MAUI. I've tried searching the dotnet/maui repo for this enhancement, but did not find anything. Should this issue be duplicated/reproduced in dotnet/maui to bring this back on the radar? |
Yes please! |
Thanks for this suggestion! As Xamarin.Forms is now in maintenance mode, this will not happen anymore for Xamarin.Forms. We're only adding bugfixes and stability fixes. If this is still important to you, make sure to check the .NET MAUI repo and see if it's already on the roadmap. If not, feel free to open a discussion to discuss a change first or open an issue with a detailed feature request. Thanks! |
|
I would like to set the FontImageSource color, font family in global control styling in resource dictionary.
But not working. |
Me too. |
Summary
FontImageSource
is amazing! Well done team for the implementation.Now that we're in it and using it, I'd like to propose that there be the ability to set the FontFamily and Color defaults and also make it styleable.
note: i do recognize that making it styleable might negate the need for the default statics, but I thought it might be nice akin to
Color.SetAccent(Color accent);
API Changes
Intended Use Case
Styling would make it far simpler to make reusable font images without having to define them one for each style.
Static default methods will make it so that we only have to define FontFamily or (less important) Color once at startup and we can use that FontFamily as the default throughout the app.
The text was updated successfully, but these errors were encountered: