diff --git a/Auth/MauiAuthBlazor/Shared/MainLayout.razor b/Auth/MauiAuthBlazor/Shared/MainLayout.razor index 260f8483..65b16397 100644 --- a/Auth/MauiAuthBlazor/Shared/MainLayout.razor +++ b/Auth/MauiAuthBlazor/Shared/MainLayout.razor @@ -3,7 +3,7 @@
- About + About
diff --git a/BottomSheet/README.md b/BottomSheet/README.md index aedf1f3b..b0ae35c7 100644 --- a/BottomSheet/README.md +++ b/BottomSheet/README.md @@ -2,7 +2,7 @@ [![Buy Me A Coffee](https://ik.imagekit.io/VladislavAntonyuk/vladislavantonyuk/misc/bmc-button.png)](https://www.buymeacoffee.com/vlad.antonyuk) -Article: https://vladislavantonyuk.azurewebsites.net/articles/Creating-a-bottom-sheet-using-.NET-MAUI +Article: https://vladislavantonyuk.github.io/articles/Creating-a-bottom-sheet-using-.NET-MAUI ## Images diff --git a/BottomSheet/README.mdpp b/BottomSheet/README.mdpp index ad7d4860..0944efc0 100644 --- a/BottomSheet/README.mdpp +++ b/BottomSheet/README.mdpp @@ -2,7 +2,7 @@ !INCLUDE "./md/header.mdpp" -Article: https://vladislavantonyuk.azurewebsites.net/articles/Creating-a-bottom-sheet-using-.NET-MAUI +Article: https://vladislavantonyuk.github.io/articles/Creating-a-bottom-sheet-using-.NET-MAUI ## Images diff --git a/CardLayout/README.md b/CardLayout/README.md index 771872ef..beba2180 100644 --- a/CardLayout/README.md +++ b/CardLayout/README.md @@ -2,7 +2,7 @@ [![Buy Me A Coffee](https://ik.imagekit.io/VladislavAntonyuk/vladislavantonyuk/misc/bmc-button.png)](https://www.buymeacoffee.com/vlad.antonyuk) -Article: https://vladislavantonyuk.azurewebsites.net/articles/Creating-a-card-stack-layout-using-.NET-MAUI +Article: https://vladislavantonyuk.github.io/articles/Creating-a-card-stack-layout-using-.NET-MAUI ## Images diff --git a/CardLayout/README.mdpp b/CardLayout/README.mdpp index c15f34f4..34d39db3 100644 --- a/CardLayout/README.mdpp +++ b/CardLayout/README.mdpp @@ -2,7 +2,7 @@ !INCLUDE "./md/header.mdpp" -Article: https://vladislavantonyuk.azurewebsites.net/articles/Creating-a-card-stack-layout-using-.NET-MAUI +Article: https://vladislavantonyuk.github.io/articles/Creating-a-card-stack-layout-using-.NET-MAUI ## Images diff --git a/Database/Sqlite/MauiSqliteBlazor/Shared/MainLayout.razor b/Database/Sqlite/MauiSqliteBlazor/Shared/MainLayout.razor index 34ca6c17..8715101f 100644 --- a/Database/Sqlite/MauiSqliteBlazor/Shared/MainLayout.razor +++ b/Database/Sqlite/MauiSqliteBlazor/Shared/MainLayout.razor @@ -7,7 +7,7 @@
- About + About
diff --git a/DynamicFab/README.md b/DynamicFab/README.md index 5fa6604f..f292ea1b 100644 --- a/DynamicFab/README.md +++ b/DynamicFab/README.md @@ -2,7 +2,7 @@ [![Buy Me A Coffee](https://ik.imagekit.io/VladislavAntonyuk/vladislavantonyuk/misc/bmc-button.png)](https://www.buymeacoffee.com/vlad.antonyuk) -Article: https://vladislavantonyuk.azurewebsites.net/articles/Creating-dynamic-floating-action-button +Article: https://vladislavantonyuk.github.io/articles/Creating-dynamic-floating-action-button ## Images diff --git a/DynamicFab/README.mdpp b/DynamicFab/README.mdpp index 66d48b05..8f9c0447 100644 --- a/DynamicFab/README.mdpp +++ b/DynamicFab/README.mdpp @@ -2,7 +2,7 @@ !INCLUDE "./md/header.mdpp" -Article: https://vladislavantonyuk.azurewebsites.net/articles/Creating-dynamic-floating-action-button +Article: https://vladislavantonyuk.github.io/articles/Creating-dynamic-floating-action-button ## Images diff --git a/KanbanBoard/README.md b/KanbanBoard/README.md index 9a21cb39..87d09f28 100644 --- a/KanbanBoard/README.md +++ b/KanbanBoard/README.md @@ -2,7 +2,7 @@ [![Buy Me A Coffee](https://ik.imagekit.io/VladislavAntonyuk/vladislavantonyuk/misc/bmc-button.png)](https://www.buymeacoffee.com/vlad.antonyuk) -Article: https://vladislavantonyuk.azurewebsites.net/articles/Creating-Kanban-Board-using-Xamarin-Forms-5 +Article: https://vladislavantonyuk.github.io/articles/Creating-Kanban-Board-using-Xamarin-Forms-5 ## Build ```pwsh diff --git a/KanbanBoard/README.mdpp b/KanbanBoard/README.mdpp index fbfd4afa..ffe375eb 100644 --- a/KanbanBoard/README.mdpp +++ b/KanbanBoard/README.mdpp @@ -2,7 +2,7 @@ !INCLUDE "./md/header.mdpp" -Article: https://vladislavantonyuk.azurewebsites.net/articles/Creating-Kanban-Board-using-Xamarin-Forms-5 +Article: https://vladislavantonyuk.github.io/articles/Creating-Kanban-Board-using-Xamarin-Forms-5 ## Build ```pwsh diff --git a/MauiAnimation/README.md b/MauiAnimation/README.md index 00b77a97..d0328274 100644 --- a/MauiAnimation/README.md +++ b/MauiAnimation/README.md @@ -2,7 +2,7 @@ [![Buy Me A Coffee](https://ik.imagekit.io/VladislavAntonyuk/vladislavantonyuk/misc/bmc-button.png)](https://www.buymeacoffee.com/vlad.antonyuk) -Article: https://vladislavantonyuk.azurewebsites.net/articles/Create-custom-animations-using-.NET-MAUI-CommunityToolkit +Article: https://vladislavantonyuk.github.io/articles/Create-custom-animations-using-.NET-MAUI-CommunityToolkit ## Images diff --git a/MauiAnimation/README.mdpp b/MauiAnimation/README.mdpp index 9af3cf57..9df863f3 100644 --- a/MauiAnimation/README.mdpp +++ b/MauiAnimation/README.mdpp @@ -2,7 +2,7 @@ !INCLUDE "./md/header.mdpp" -Article: https://vladislavantonyuk.azurewebsites.net/articles/Create-custom-animations-using-.NET-MAUI-CommunityToolkit +Article: https://vladislavantonyuk.github.io/articles/Create-custom-animations-using-.NET-MAUI-CommunityToolkit ## Images diff --git a/MauiBadge/README.md b/MauiBadge/README.md index 65487734..356de35e 100644 --- a/MauiBadge/README.md +++ b/MauiBadge/README.md @@ -2,7 +2,7 @@ [![Buy Me A Coffee](https://ik.imagekit.io/VladislavAntonyuk/vladislavantonyuk/misc/bmc-button.png)](https://www.buymeacoffee.com/vlad.antonyuk) -Article: https://vladislavantonyuk.azurewebsites.net/articles/AppIcon-Badge-with-.NET-MAUI +Article: https://vladislavantonyuk.github.io/articles/AppIcon-Badge-with-.NET-MAUI ## Images diff --git a/MauiBadge/README.mdpp b/MauiBadge/README.mdpp index b546950f..d0c74676 100644 --- a/MauiBadge/README.mdpp +++ b/MauiBadge/README.mdpp @@ -2,7 +2,7 @@ !INCLUDE "./md/header.mdpp" -Article: https://vladislavantonyuk.azurewebsites.net/articles/AppIcon-Badge-with-.NET-MAUI +Article: https://vladislavantonyuk.github.io/articles/AppIcon-Badge-with-.NET-MAUI ## Images diff --git a/MauiBank/README.md b/MauiBank/README.md index a7548c0c..bcafa9c4 100644 --- a/MauiBank/README.md +++ b/MauiBank/README.md @@ -2,7 +2,7 @@ [![Buy Me A Coffee](https://ik.imagekit.io/VladislavAntonyuk/vladislavantonyuk/misc/bmc-button.png)](https://www.buymeacoffee.com/vlad.antonyuk) -Article: https://vladislavantonyuk.azurewebsites.net/articles/Replicate-a-bank-application-UI-using-.NET-MAUI +Article: https://vladislavantonyuk.github.io/articles/Replicate-a-bank-application-UI-using-.NET-MAUI ## Images diff --git a/MauiBank/README.mdpp b/MauiBank/README.mdpp index 8d4a2fa7..1004e557 100644 --- a/MauiBank/README.mdpp +++ b/MauiBank/README.mdpp @@ -2,7 +2,7 @@ !INCLUDE "./md/header.mdpp" -Article: https://vladislavantonyuk.azurewebsites.net/articles/Replicate-a-bank-application-UI-using-.NET-MAUI +Article: https://vladislavantonyuk.github.io/articles/Replicate-a-bank-application-UI-using-.NET-MAUI ## Images diff --git a/MauiBarcode/App.xaml b/MauiBarcode/App.xaml new file mode 100644 index 00000000..a3e97d5b --- /dev/null +++ b/MauiBarcode/App.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/MauiBarcode/App.xaml.cs b/MauiBarcode/App.xaml.cs new file mode 100644 index 00000000..132ff99f --- /dev/null +++ b/MauiBarcode/App.xaml.cs @@ -0,0 +1,11 @@ +namespace MauiBarcode; + +public partial class App : Application +{ + public App() + { + InitializeComponent(); + + MainPage = new AppShell(); + } +} \ No newline at end of file diff --git a/MauiBarcode/AppShell.xaml b/MauiBarcode/AppShell.xaml new file mode 100644 index 00000000..34dfd4d1 --- /dev/null +++ b/MauiBarcode/AppShell.xaml @@ -0,0 +1,28 @@ + + + + + + + + + + + + diff --git a/MauiBarcode/AppShell.xaml.cs b/MauiBarcode/AppShell.xaml.cs new file mode 100644 index 00000000..0b83671a --- /dev/null +++ b/MauiBarcode/AppShell.xaml.cs @@ -0,0 +1,9 @@ +namespace MauiBarcode; + +public partial class AppShell : Shell +{ + public AppShell() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/MauiBarcode/CommunityToolkitCameraPage.xaml b/MauiBarcode/CommunityToolkitCameraPage.xaml new file mode 100644 index 00000000..e8f5ebdf --- /dev/null +++ b/MauiBarcode/CommunityToolkitCameraPage.xaml @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/MauiBarcode/CommunityToolkitCameraPage.xaml.cs b/MauiBarcode/CommunityToolkitCameraPage.xaml.cs new file mode 100644 index 00000000..e90eaac9 --- /dev/null +++ b/MauiBarcode/CommunityToolkitCameraPage.xaml.cs @@ -0,0 +1,78 @@ +namespace MauiBarcode; + +#if WINDOWS +using Windows.Graphics.Imaging; +using System.Runtime.InteropServices.WindowsRuntime; +#endif +using Camera.MAUI.ZXing; +using CommunityToolkit.Maui.Alerts; +using CommunityToolkit.Maui.Core; +using CommunityToolkit.Maui.Views; +using Microsoft.Maui.Graphics.Platform; + +public partial class CommunityToolkitCameraPage : ContentPage +{ + private readonly ZXingBarcodeDecoder barcodeReader = new (); + + public CommunityToolkitCameraPage() + { + InitializeComponent(); + } + + protected override async void OnAppearing() + { + base.OnAppearing(); + ToolkitCameraView.MediaCaptured += OnMediaCaptured; + + var cameras = await ToolkitCameraView.GetAvailableCameras(CancellationToken.None); + ToolkitCameraView.SelectedCamera = cameras.FirstOrDefault(x => x.Position != CommunityToolkit.Maui.Core.Primitives.CameraPosition.Front); + + await Task.Delay(1000); + await ToolkitCameraView.StartCameraPreview(CancellationToken.None); + + PeriodicTimer timer = new(TimeSpan.FromMilliseconds(3000)); + while (await timer.WaitForNextTickAsync()) + { + await ToolkitCameraView.CaptureImage(CancellationToken.None); + } + } + + protected override void OnDisappearing() + { + ToolkitCameraView.MediaCaptured -= OnMediaCaptured; + base.OnDisappearing(); + } + + private async void OnMediaCaptured(object? sender, MediaCapturedEventArgs e) + { + try + { + var image = PlatformImage.FromStream(e.Media); +#if ANDROID + var results = barcodeReader.Decode(image.AsBitmap()); +#elif IOS || MACCATALYST + var results = barcodeReader.Decode(image.AsUIImage()); +#elif WINDOWS + var softwareBitmap = SoftwareBitmap.CreateCopyFromBuffer( + image.AsBytes().AsBuffer(), + BitmapPixelFormat.Rgba16, + (int)image.Width, + (int)image.Height); + var results = barcodeReader.Decode(softwareBitmap); +#else + var results = new List(); +#endif + foreach (var result in results ?? []) + { + await MainThread.InvokeOnMainThreadAsync(async () => + { + await Toast.Make(result.Text, ToastDuration.Long).Show(); + }); + } + } + catch (Exception exception) + { + Console.WriteLine(exception); + } + } +} \ No newline at end of file diff --git a/MauiBarcode/MainPage.xaml b/MauiBarcode/MainPage.xaml new file mode 100644 index 00000000..2b8e116f --- /dev/null +++ b/MauiBarcode/MainPage.xaml @@ -0,0 +1,18 @@ + + + + + + +