SimpleToolkit is a .NET MAUI library of helpers and simple, fully customizable controls, such as SimpleShell - custom Shell implementation that allows you to create unique navigation experiences.
I didn't see any mention in the documentation as to what the namespace should be so making an assumption that this is the correct one since I was able to access the ButtonContent from it.
And this is the xaml code for the ContentButton:
`
`
It displays the text ok but not the icon. When I changed the simpleCore:icon TintColor property to red that I spotted a little red square but no image.
I'm testing this with an Android project where my icons (.png) are stored under Platforms\Android\Resources\drawable folder. Note that my icon gets displayed when I use:
`
`
which would indicate that the icon is available to the project.
Any ideas how to resolve this?
Thanks
could you please try the newest version of SimpleToolkit? I tried your code and it worked for me. If it does not work, you can always use IconTintColorBehavior from Community Toolkit.
Downloaded latest version of SimpleToolkit.Core (3.0.0) from Nuget.
Added the UseSimpleToolkit to builder as suggested in documentation
var builder = MauiApp.CreateBuilder(); builder .UseMauiApp<App>() .RegisterAppServices() .UseSimpleToolkit() .RegisterViewModels() .RegisterViews() .ConfigureFonts(fonts => { fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); });
Added the namespace to my page:xmlns:simpleCore="clr-namespace:SimpleToolkit.Core;assembly=SimpleToolkit.Core"
I didn't see any mention in the documentation as to what the namespace should be so making an assumption that this is the correct one since I was able to access the ButtonContent from it.
And this is the xaml code for the ContentButton:
`