
Matrixscan Batch Maui
Wire Scandit MatrixScan batch barcode capture into a .NET MAUI app with XAML views and MauiProgram setup.
Install
npx skills add https://github.com/scandit/skills --skill matrixscan-batch-mauiWhat is this skill?
- MAUI ContentPage XAML with Scandit.DataCapture.Core.UI.Maui namespaces
- MainPage code-behind and MauiProgram bootstrap pattern
- ViewModel BindingContext wiring for MatrixScan UI
- Absolute layout pattern for full-screen camera preview (truncated sample in skill readme)
Adoption & trust: 1 installs on skills.sh; 12 GitHub stars; trending (+100% hot-view momentum).
Recommended Skills
Vercel React Native Skillsvercel-labs/agent-skills
Firebase Basicsfirebase/agent-skills
Building Native Uiexpo/skills
Firebase Ai Logic Basicsfirebase/agent-skills
Native Data Fetchingexpo/skills
Firebase Firestorefirebase/agent-skills
Journey fit
SKILL.md
READMESKILL.md - Matrixscan Batch Maui
<?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="MyApp.Views.MainPage" Title="Scan"> <ContentPage.Content> <Grid /> </ContentPage.Content> </ContentPage> namespace MyApp.Views; public partial class MainPage : ContentPage { public MainPage() { this.InitializeComponent(); } } using Microsoft.Extensions.Logging; namespace MyApp; public static class MauiProgram { public static MauiApp CreateMauiApp() { var builder = MauiApp.CreateBuilder(); builder .UseMauiApp<App>() .ConfigureFonts(fonts => { fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); }); #if DEBUG builder.Logging.AddDebug(); #endif return builder.Build(); } } <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:scandit="clr-namespace:Scandit.DataCapture.Core.UI.Maui;assembly=ScanditCaptureCoreMaui" xmlns:vm="clr-namespace:MyApp.ViewModels" x:Class="MyApp.Views.MainPage" Title="MatrixScan"> <ContentPage.BindingContext> <vm:MainPageViewModel /> </ContentPage.BindingContext> <ContentPage.Content> <AbsoluteLayout> <scandit:DataCaptureView x:Name="dataCaptureView" AbsoluteLayout.LayoutBounds="0,0,1,1" AbsoluteLayout.LayoutFlags="All" DataCaptureContext="{Binding DataCaptureContext}" /> </AbsoluteLayout> </ContentPage.Content> </ContentPage> using MyApp.ViewModels; using Scandit.DataCapture.Barcode.Batch.UI.Overlay; namespace MyApp.Views; public partial class MainPage : ContentPage { private BarcodeBatchBasicOverlay overlay = null!; private readonly MainPageViewModel viewModel; public MainPage() { this.InitializeComponent(); this.viewModel = (MainPageViewModel)this.BindingContext; // Initialization of the overlay happens on the handler-changed event so the // native platform view exists. this.dataCaptureView.HandlerChanged += this.OnDataCaptureViewHandlerChanged; } private void OnDataCaptureViewHandlerChanged(object? sender, EventArgs e) { this.overlay = BarcodeBatchBasicOverlay.Create( this.viewModel.BarcodeBatch, BarcodeBatchBasicOverlayStyle.Frame); this.dataCaptureView.AddOverlay(this.overlay); } protected override void OnAppearing() { base.OnAppearing(); _ = this.viewModel.ResumeAsync(); } protected override void OnDisappearing() { base.OnDisappearing(); _ = this.viewModel.SleepAsync(); } } using System.ComponentModel; using Scandit.DataCapture.Barcode.Batch.Capture; using Scandit.DataCapture.Barcode.Batch.Data; using Scandit.DataCapture.Barcode.Data; using Scandit.DataCapture.Core.Capture; using Scandit.DataCapture.Core.Data; using Scandit.DataCapture.Core.Source; namespace MyApp.ViewModels; public abstract class BaseViewModel : INotifyPropertyChanged { public virtual Task ResumeAsync() => Task.CompletedTask; public virtual Task SleepAsync() => Task.CompletedTask; public event PropertyChangedEventHandler? PropertyChanged; protected void OnPropertyChanged(string name) => this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name)); } public record ScanResult(int Id, string Data, string Symbology); public class MainPageViewModel : BaseViewModel, IBarcodeBatchListener { public const string ScanditLicenseKey = "-- ENTER YOUR SCANDIT LICENSE KEY HERE --"; private readonly HashSet<int> seenTrackingIds