79228235

Date: 2024-11-26 20:55:57
Score: 0.5
Natty:
Report link

FmgLib.MauiMarkup is an open source library that provides the best, most useful and comprehensive structure for C# Markup. It has its own templates.

For sample applications, you can visit: https://github.com/gonultasmf?tab=repositories&q=FmgLib&type=&language=&sort=

For detailed documentation: https://github.com/FmgLib/FmgLib.MauiMarkup/blob/master/README.md

Sample AppShell.cs codes:

using FmgLib.MauiMarkup;

namespace MyFinance;

public partial class AppShell : Shell
{
    public AppShell(IServiceProvider serviceProvider)
    {
        this
        .FlyoutBehavior(FlyoutBehavior.Disabled)
        .Items(
            new ShellContent()
            .Title("")
            .ContentTemplate(() => new StartedPage())
            .Route(nameof(StartedPage)),

            new ShellContent()
            .Title("")
            .ContentTemplate(() => serviceProvider.GetService<LoginPage>())
            .Route(nameof(LoginPage)),

            new ShellContent()
            .Title("")
            .ContentTemplate(() => serviceProvider.GetService<RegisterPage>())
            .Route(nameof(RegisterPage)),

            new ShellContent()
            .Title("")
            .ContentTemplate(() => serviceProvider.GetService<AddOrEditPage>())
            .Route(nameof(AddOrEditPage)),

            new TabBar()
            .Items(
                new Tab()
                .Title("Anasayfa")
                .Items(serviceProvider.GetService<MainPage>())
                .Route(nameof(MainPage))
                .FlyoutDisplayOptions(FlyoutDisplayOptions.AsSingleItem)
                .Icon("home.png"),

                new Tab()
                .Title("İstatistik")
                .Items(serviceProvider.GetService<ChartPage>())
                .Route(nameof(AccountPage))
                .FlyoutDisplayOptions(FlyoutDisplayOptions.AsSingleItem)
                .Icon("chart.png"),

                new Tab()
                .Title("İşlemler")
                .Items(serviceProvider.GetService<ItemsPage>())
                .Route(nameof(ItemsPage))
                .FlyoutDisplayOptions(FlyoutDisplayOptions.AsSingleItem)
                .Icon("adjust.png"),

                new Tab()
                .Title("Profil")
                .Items(serviceProvider.GetService<AccountPage>())
                .Route(nameof(AccountPage))
                .FlyoutDisplayOptions(FlyoutDisplayOptions.AsSingleItem)
                .Icon("user.png")
            )
        );
    }
}
Reasons:
  • Probably link only (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Mustafa Gönültaş