This repository contains some custom made controls for your .NET MAUI application. This library is currently under development and for the moment there is only a RatingControl
available.
Install the package via NuGet.
Open the class MauiProgram
and call UseMauiControlsLib()
on the MauiAppBuilder
.
MauiAppBuilder builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseMauiControlsLib() // <--
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});
return builder.Build();
In order to make use of the control within XAML you can use this namespace:
xmlns:controls="http://www.tsjdev-apps.de/controls/maui"
You can use the InitialsControl
in your .NET MAUI application to show a round badge with the initials of a person.
The following table explains all the available properties and their default value.
name | type | default value | description |
---|---|---|---|
DefaultBackgroundColor |
Color |
Colors.LightGray |
Indicates the default background color if no name is available |
TextColorLight |
Color |
Colors.White |
Indicates the light text color |
TextColorDark |
Color |
Colors.Black |
Indicates the dark text color |
Name |
string |
string.Empty |
Indicates the name to take the initials from |
Size |
ControlSize |
ControlSize.Small |
Indicates the size of the control |
Screenshot of InitialsControl
on Android
Screenshot of InitialsControl
on Windows
You can use the RatingControl
in your .NET MAUI application.
The following table explains all the available properties and their default value.
name | type | default value | description |
---|---|---|---|
Amount |
int |
5 |
Indicates the number of rating items to be displayed |
CurrentValue |
float |
2.5f |
Indicates the current rating value to be displayed |
ItemSize |
float |
24f |
Indicates the size of each rating item |
ItemSpacing |
float |
6f |
Indicates the spacing between each rating item. |
FillColor |
Color |
Colors.Yellow |
Indicates the fill color to be used for each rating item |
UnfillColor |
Color |
Colors.LightGray |
Indicates the unfill color to be used for each rating item |
Path |
string |
<Star> |
Indicates the path used to draw each rating item |
Screenshot of RatingControl
on Android
Screenshot of RatingControl
on Windows
You can use the StaticChipControl
in your .NET MAUI application.
The following table explains all the available properties and their default value.
name | type | default value | description |
---|---|---|---|
Text |
string |
string.Empty |
Indicates the text of the chip to be displayed |
Color |
Color |
Colors.LightGray |
Indicates the background color of the chip |
TextColor |
Color |
Colors.Black |
Indicates the text color of the text |
ImageSource |
ImageSource |
null |
Indicates the icon of the chip |
Screenshot of StaticChipControl
on Android
Screenshot of StaticChipControl
on Windows
I appreciate any form of support to keep my Open Source activities going.
Whatever you decide, be it reading and sharing my blog posts, using my NuGet packages or buying me a coffee/book, thank you ❤️.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.