{"id":27817032,"url":"https://github.com/yu-core/mauiblazortoolkit","last_synced_at":"2025-05-01T14:30:00.612Z","repository":{"id":168357577,"uuid":"643744031","full_name":"Yu-Core/MauiBlazorToolkit","owner":"Yu-Core","description":"The Maui Blazor Toolkit encapsulates some Maui and Maui Blazor tool classes, such as changing the color of the title bar","archived":false,"fork":false,"pushed_at":"2025-03-23T11:54:30.000Z","size":465,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T14:10:01.584Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yu-Core.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-22T04:16:09.000Z","updated_at":"2025-03-23T11:53:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"8069b6d4-7a47-4310-b6d2-b303d8d022db","html_url":"https://github.com/Yu-Core/MauiBlazorToolkit","commit_stats":null,"previous_names":["yu-core/mauiblazortoolkit"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yu-Core%2FMauiBlazorToolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yu-Core%2FMauiBlazorToolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yu-Core%2FMauiBlazorToolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yu-Core%2FMauiBlazorToolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yu-Core","download_url":"https://codeload.github.com/Yu-Core/MauiBlazorToolkit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251889879,"owners_count":21660400,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-01T14:30:00.051Z","updated_at":"2025-05-01T14:30:00.601Z","avatar_url":"https://github.com/Yu-Core.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MauiBlazorToolkit\nEnglish || [简体中文](/README.zh-CN.md)\n\nThe Maui Blazor toolbox encapsulates some Maui and Maui Blazor tool classes, such as changing the color of the title bar.\n\nImitated the [.NET MAUI Community Toolkit](https://github.com/CommunityToolkit/Maui). Thank you very much.\n\n## Start\nInstall [Yu-Core.MauiBlazorToolkit](https://www.nuget.org/packages/Yu-Core.MauiBlazorToolkit) from NuGet\n\nTo use the MauiBlazor toolkit, you need to call the extension method in the file, as shown below: MauiProgram.cs\n\n```Csharp\nusing MauiBlazorToolKit;\n\npublic static class MauiProgram\n{\n\tpublic static MauiApp CreateMauiApp()\n\t{\n\t\tvar builder = MauiApp.CreateBuilder();\n\t\tbuilder\n\t\t\t.UseMauiApp\u003cApp\u003e()\n\t\t\t// Initialize the MAUI Blazor Toolkit by adding the below line of code\n\t\t\t.UseMauiBlazorToolkit()\n\t\t\t// After initializing the MAUI Blazor Toolkit, optionally add additional fonts\n\t\t\t.ConfigureFonts(fonts =\u003e\n\t\t\t{\n\t\t\t\tfonts.AddFont(\"OpenSans-Regular.ttf\", \"OpenSansRegular\");\n\t\t\t\tfonts.AddFont(\"OpenSans-Semibold.ttf\", \"OpenSansSemibold\");\n\t\t\t});\n\n\t\t// Continue initializing your .NET MAUI App here\n\n\t\treturn builder.Build();\n\t}\n}\n```\n\n## TitleBarBehavior (Title Bar Color)\n\n`TitleBarBehavior` allows you to customize the color and style of the device's title bar.\nNote that it can only be used in Windows and Mac OS. If you want to change the status bar of Android and iOS, please refer to the [.NET MAUI Community Toolkit](https://learn.microsoft.com/zh-cn/dotnet/communitytoolkit/maui/behaviors/statusbar-behavior?tabs=ios)\n\n#### Configuration\n\nModify ` MainPage.xaml`\n```xaml\n\u003cContentPage xmlns=\" http://schemas.microsoft.com/dotnet/2021/maui \"\n\t\t\txmlns:x=\" http://schemas.microsoft.com/winfx/2009/xaml \"\n\t\t\txmlns:mauiBlazorToolkit=\"clr-namespace:MauiBlazorToolkit.Behaviors;assembly=MauiBlazorToolkit\"\n\t\t\tx:Class=\"MyLittleApp.MainPage\"\u003e\n\t\u003cContentPage.Behaviors\u003e\n\t\t\u003cmauiBlazorToolkit:TitleBarBehavior TitleBarColor=\"#fff\" TitleBarStyle=\"DarkContent\"\u003e\u003c/mauiBlazorToolkit:TitleBarBehavior\u003e\n\t\u003c/ContentPage.Behaviors\u003e\n\u003c/ContentPage\u003e\n```\n\nModify `MauiProgram.cs`\n\n```csharp\n\tvar builder = MauiApp.CreateBuilder();\n\tbuilder\n\t.UseMauiApp\u003cApp\u003e()\n\t.UseMauiBlazorToolkit(options =\u003e\n\t{\n\t\toptions.TitleBar = true;\n\t})\n```\n\n#### Using\n\n```csharp\nusing MauiBlazorToolKit.Platform\n\n#if Windows || MacCatalyst\n\tTitleBar.SetColor(titleBarColor);\n\tTitleBar.SetStyle(TitleBarStyle.DarkContent);\n#endif\n```\n\n## AppStoreLauncher (opens the default app store)\n`AppStoreLauncher` allows you to open the default app store\n\nThe appId is the ProductId of the app in Windows\n\nThe appId is the bundle ID of the app in iOS/MacCatalyst\n\nThe appId is the package name of the app in Android\n\n#### Using\n```csharp\nAppStoreLauncher.TryOpenAsync(appId);\n```\n\n## MediaFilePicker(Media file picker)\n`MediaFilePicker` Allow you to select one or multiple media files\nNote that it can only be used on Android and iOS.\n\n#### Using\n\n```csharp\nusing MauiBlazorToolkit.Essentials\n\n#if Android || iOS\n\tFileResult? photoFileResult = await MediaFilePicker.Default.PickPhotoAsync();\n\tFileResult? videoFileResult = await MediaFilePicker.Default.PickVideoAsync();\n\tIEnumerable\u003cFileResult\u003e? photoFileResults = await MediaFilePicker.Default.PickMultiplePhotoAsync();\n\tIEnumerable\u003cFileResult\u003e? videoFileResults = await MediaFilePicker.Default.PickMultipleVideoAsync();\n#endif\n```\n\n## AndroidFilePicker(Android file picker)\n`AndroidFilePicker` Improvement of FilePicker in MAUI Essentials with more options for selection\nNote that it can only be used in Android and may be deleted in the future\n\n#### Using\n\n```csharp\nusing MauiBlazorToolkit.Essentials\n\n#if Android\n\tFileResult? fileResult = await AndroidFilePicker.Default.PickAsync();\n\tIEnumerable\u003cFileResult\u003e? fileResults = await AndroidFilePicker.Default.PickMultipleAsync();\n#endif\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyu-core%2Fmauiblazortoolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyu-core%2Fmauiblazortoolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyu-core%2Fmauiblazortoolkit/lists"}