Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/RezaShaban/PersianUIControlsMaui
- Owner: RezaShaban
- Created: 2023-06-06T17:13:03.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-01-23T17:58:52.000Z (10 months ago)
- Last Synced: 2024-07-30T12:34:57.845Z (3 months ago)
- Language: C#
- Size: 1.42 MB
- Stars: 22
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-dotnet-maui - PersianUIControlsMaui - square)](https://github.com/RezaShaban/PersianUIControlsMaui/stargazers)|[![GitHub last-commit](https://img.shields.io/github/last-commit/RezaShaban/PersianUIControlsMaui?style=flat-square)](https://github.com/RezaShaban/PersianUIControlsMaui/commits) (Plugins)
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 dialogServiceprivate 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)