Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/RezaShaban/PersianUIControlsMaui

Persian Calendar & some other controls for .NET MAUI
https://github.com/RezaShaban/PersianUIControlsMaui

Last synced: 3 months ago
JSON representation

Persian Calendar & some other controls for .NET MAUI

Awesome Lists containing this project

README

        

# Persian UI Controls Maui

Persian Calendar & some other controls for .NET MAUI

To use this package in your MAUI project use the below code in your MauiProgram.cs file

## Controls

- Persian DatePicker ```Single, Multiple, Range```
- TreeView ```None, Single, Multiple```
- TabView
- SlideButton
- Picker ```Single, Multiple```
- Dialogs ```Alter, Confirm, Prompt, Custom```
- Expander
- Entry
- Editor
- AutoCompleteView ```Comming Soon...```

## Deployment

To deploy this project run

```bash
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
})
.UseMauiCommunityToolkit()
.UsePersianUIControls();
return builder.Build();
}
}
```

XAML:

```bash
xmlns:persian="clr-namespace:PersianUIControlsMaui.Controls;assembly=PersianUIControlsMaui"

```

CalendarOption:
```bash
CalendarOption = new CalendarOptions()
{
SelectDateMode = PersianUIControlsMaui.Enums.SelectionDateMode.Day,
SelectionMode = PersianUIControlsMaui.Enums.SelectionMode.Single,
SelectDayColor = Colors.Orange,
AutoCloseAfterSelectDate = false,
OnAccept = OnAcceptDate,
OnCancel = new Action(() => { }),
MinDateCanSelect = DateTime.Now.AddDays(-3),
MaxDateCanSelect = DateTime.Now.AddDays(4),
CanSelectHolidays = false
};
```

Use Dialogs:
```bash
inject in constructor => IDialogService dialogService

private void ShowConfirm(object obj)
{
dialogService.Confirm(new ConfirmConfig()
{
Title = "حذف کالا",
AcceptText = "آره",
CancelText = "نه",
Message = "نسبت به حذف آیتم انتخابی اطمینان دارید؟",
Icon = MessageIcon.QUESTION,
OnAction = new Action((arg) => { }),
});
}
```
## Screenshots

![App Screenshot](https://raw.githubusercontent.com/RezaShaban/PersianUIControlsMaui/master/PersianUISamples/date-picker-demo.png)