What has shipped in the space of .NET MAUI this week?
.NET MAUI Service Release 1
This week .NET MAUI shipped it's first post-GA servicing with loads of bug fixes. Though it is versioned 6.0.400, the workload has manifests for the .NET SDK 6.0.300 "band" so you can install it with the stable .NET SDK as well as the 6.0.400-preview releases now shipping in Visual Studio previews.
Community Libraries
Looking chronologically through NuGet for those that stood out to me for adding or updating .NET MAUI support.
Constraint Layout
If you like to define your layouts via constraints, this library may be for you.
- https://github.com/xtuzy/SharpConstraintLayout
- https://www.nuget.org/packages/SharpConstraintLayout.Maui.Native
Compiled Bindings
x:Bind all the things! Looking at the examples on the GitHub page, I might start using this myself.
<Label
HorizontalOptions="Center"
FontSize="32"
SemanticProperties.HeadingLevel="Level1"
Text="{x:Bind Hello}" />
Sentry
Sentry offers error tracking and performance monitoring for many frameworks, and is now adding support for .NET MAUI.
Fluxera Guards
- https://github.com/fluxera/Fluxera.Guards
- https://www.nuget.org/packages/Fluxera.Extensions.Hosting.Maui
this.Name = Guard.Against.NullOrWhiteSpace(name, nameof(name));
this.Credit = Guard.Against.Negative(credit, nameof(credit));
Vapolia MauiGestures
This library offers a bunch of gestures with conveniences: Tap, DoubleTap, Pan, LongPress, TapPoint, DoubleTapPoint, PanPoint, LongPressPoint, SwipeLeft, SwipeRight, SwipeTop, SwipeBottom, Pinch
- https://github.com/vapolia/MauiGestures/
- https://www.nuget.org/packages/Vapolia.MauiGesture/1.0.0-ci2501125632
<StackLayout ui:Gesture.TapCommand="{Binding OpenCommand}" IsEnabled="True">
<Label Text="1.Tap this text to open an url" />
</StackLayout>
<StackLayout ui:Gesture.DoubleTapPointCommand="{Binding OpenPointCommand}" IsEnabled="True">
<Label Text="2.Double tap this text to open an url" />
</StackLayout>
<BoxView
ui:Gesture.PanPointCommand="{Binding PanPointCommand}"
HeightRequest="200" WidthRequest="300"
InputTransparent="False"
IsEnabled="True"
/>
ESRI ArcGIS
Neo Controls
Neumorphic styled controls.
- https://github.com/felipebaltazar/Maui.NeoControls
- https://www.nuget.org/packages/NeoControls.Maui/1.0.8-pre
<NeoButton>
<NeoButton.BackgroundGradient>
<LinearGradient Angle="45">
<NeoGradientStop Color="Red" Offset="0" />
<NeoGradientStop Color="Yellow" Offset="1" />
</LinearGradient>
</NeoButton.BackgroundGradient>
<StackLayout Orientation="Vertical">
<Image Source="MyImage.png "/>
<Label Text="My Button Label"/>
</StackLayout>
</NeoButton>
AppActions.Icons
This library adds default icons for common AppActions which are those shortcuts you can do from the app icon.
- https://github.com/adenearnshaw/AppActions.Icons.Maui
- https://www.nuget.org/packages/AppActions.Icons.Maui
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureEssentials(essentials =>
{
essentials
.UseAppActionIcons() // Add this line
.AddAppAction("home_sc", "Home", icon: AppActionIcon.Home)
.OnAppAction(App.HandleAppActions);
});
return builder.Build();
}
FluentRest
This reminds me of https://flurl.dev and I'm not sure what this does better. I'm a fan of this style.
var result = await "https://api.mysite.com"
.AppendPathSegment("person")
.SetQueryParams(new { api_key = "xyz" })
.WithOAuthBearerToken("my_oauth_token")
.PostJsonAsync(new { first_name = firstName, last_name = lastName })
.ReceiveJson<T>();
Vapolia UserInteraction
A set of conveniences for handling coming interactions like Confirm, Alert, Menu, Toast, ActivityIndicator, etc..
- https://github.com/softlion/UserInteraction
- https://www.nuget.org/packages/Vapolia.UserInteraction.Maui/1.0.0-ci2480910310
Context Menu Container
A context menu is something .NET MAUI may include in the future, particularly for desktop. For now it's great to see that a library like this exists to fill the need!
- https://github.com/anpin/ContextMenuContainer
- https://www.nuget.org/packages/ContextMenuContainer/1.1.0-preview
<c:ContextMenuContainer x:Name="container1">
<c:ContextMenuContainer.MenuItems>
<c:ContextMenuItem Text="Action 1" Command="{Binding FirstCommand}" CommandParameter="Action 1 pressed!" />
<c:ContextMenuItem Text="Action with icon" Command="{Binding FirstCommand}" CommandParameter="Action with icon pressed!" Icon="{Binding SettingsIconSource}"/>
</c:ContextMenuContainer.MenuItems>
<c:ContextMenuContainer.Content>
<Frame BackgroundColor="ForestGreen" Padding="24" CornerRadius="0" >
<Label Text="{Binding Text}" HorizontalTextAlignment="Center" TextColor="White" FontSize="36" HorizontalOptions="FillAndExpand" VerticalOptions="Center" MinimumHeightRequest="30" MinimumWidthRequest="100"/>
</Frame>
</c:ContextMenuContainer.Content>
</c:ContextMenuContainer>
Plugin.LocalNotification
- https://github.com/thudugala/Plugin.LocalNotification
- https://www.nuget.org/packages/Plugin.LocalNotification/9.2.1-preview05
var notification = new NotificationRequest
{
NotificationId = 100,
Title = "Test",
Description = "Test Description",
ReturningData = "Dummy data", // Returning data when tapped on notification.
Schedule =
{
NotifyTime = DateTime.Now.AddSeconds(30) // Used for Scheduling local notification, if not specified notification will show immediately.
}
};
await NotificationCenter.Current.Show(notification);
BarCodeScanner
The name says it all.
- https://github.com/JimmyPun610/BarcodeScanner.Mobile
- https://www.nuget.org/packages/BarcodeScanner.Mobile.Maui/6.3.0.21-pre
ReactorUI
This is a cool ReactJS and Flutter inspired UI library for .NET MAUI.
private VisualNode RenderPhoneLayout()
{
return new ScrollView
{
new VerticalStackLayout
{
new CurrentWidget(),
new BoxView()
.HeightRequest(1),
new Next24HrWidget(),
new Next7DWidget()
}
.Padding(0,50)
.Spacing(25)
};
}
Top comments (0)