14

.NET MAUI is HERE! 3 NEW Features that will blow your mind šŸ¤Æ

 2 years ago
source link: https://dev.to/dotnetsafer/net-maui-is-here-3-new-features-that-will-blow-your-mind-ngp
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Cover image for .NET MAUI is HERE! 3 NEW Features that will blow your mind šŸ¤Æ
Dotnetsafer

Posted on Oct 20

.NET MAUI is HERE! 3 NEW Features that will blow your mind šŸ¤Æ

.NET MAUI is a framework for .NET Core and ASP.NET Core MVC applications which can be used in cross-platform development and in building complex web applications.

.NET MAUI was created by Microsoft to take care of all the things that developers usually need to do themselves, such as managing HTTP requests, setting up routing logic, handling errors and more. So that they can focus on whatā€™s important: building an application that does something useful for their customers.

In the latest preview, Microsoft showed three new features about .NET MAUI that will blow your mind šŸ‘‡


āœØUpdated Controls

Microsoft has changed the implementations of numerous controls in this new .NET MAUI version, which is a significant improvement. Letā€™s look at the most important ones.

šŸ“¦ BoxView

BoxView is a basic rectangle with a given width, height, and color. It could be used for BoxView decorating, basic graphics, and touch interaction with the user.

šŸ“IndicatorView

The IndicatorView is a control that shows indications in a CarrouselView that reflect the number of items and the current position:

šŸ“· ImageButton

The ImageButton view has the ability to combine the Button and Image views to produce a button with an image as its content. To command the program to do a certain activity, the user pushes the ImageButton with their finger or clicks it with their mouse. The ImageButton view, unlike the Button view, has no idea of text and text appearance.

šŸ’» WebView

WebView renders any online or embedded HTML material using the platformā€™s native browser control; suitable for displaying markup that is more complicated than the subset of HTML supported by Label.


šŸ”² Shadows, corners, and borders

Here we have Microsoft.Maui.Graphics library, that offers an +uniform UI* drawing API based on native graphics engines, allowing us to quickly add borders, corner rendering, and gorgeous shadows to nearly any .NET MAUI layout or control.

Microsoft presents a new Border control. It can be wrapped around any layout or control to offer borders and independent corner control. This controls are available in WPF, UWP, Silverlight, and the most recent Windows App SDK styles.

In this Microsoft example, we can see how they added the stroke and rounded the top-left and bottom-right corners by wrapping a border checks around the counter label this template šŸ‘‡

<Border 
    Grid.Row="2"
    Padding="16,8"
    Stroke="{StaticResource PrimaryBrush}"
    Background="#2B0B98"
    StrokeThickness="4"
    HorizontalOptions="Center">
    <Border.StrokeShape>
        <RoundRectangle CornerRadius="40,0,0,40"/>
    </Border.StrokeShape>
    <Label 
        Text=".NET MAUI Preview: 9"                
        FontSize="18"
        FontAttributes="Bold"
        TextColor="White"
        x:Name="CounterLabel" />
</Border>
Enter fullscreen modeExit fullscreen mode

The specified shapeā€™s corner radius accepts a Thickness type value, allowing separate control of each of the rectangleā€™s +four corners:* bottom-left, bottom-right, top-left and top-right.

The border control creates a wraparound view element around a single piece of content, allowing you to customize the background color and padding. There are several more attributes that may be used to modify the borderā€™s stroke, including:

  • StrokeLineCap: is a form that appears at the end of a line.

  • StrokeDashOffset: is the distance between the dots in the dash pattern.

  • StrokeMiterLimit: set the miter length ratio to half of the stroke thickness.

  • StrokeLineJoin: a type of vertices join.

  • StrokeDashArray: a dash and gap pattern in the stroke.

Are you ready to give your user interface some depth? Any layout or control, including pictures and objects, can be given with Shadow šŸ‘‡

<Image>
    <Image.Shadow>
        <Shadow Brush="#000000" 
                Offset="20,20"
                Radius="40"
                Opacity="0.8"/>
    </Image.Shadow>
</Image>
Enter fullscreen modeExit fullscreen mode

This is the result šŸ‘‡


šŸš„ Android Quick Start

Ahead-of-time (AOT) compilation improves the speed with which your Android applications can code start. If youā€™re trying to stay below the wifi installation bar, full AOT may make your application artifacts larger than you want.

Startup tracing is the solution in this case. We may balance performance and space by partially AOTā€™ing only the sections of your program that are run at startup.

The following are the results of device testing on the Pixel 5:


šŸ”° Ecosystem Controls

DevExpress, Syncfusion, and Telerik have all recently released new sets of controls for.NET MAUI that take use of Microsoftā€™s strong graphics capabilities. Maui.Graphics.


šŸŽ Do you want a gift?

Just for entering this article and making it this far, Iā€™m GIVING you a GIFT of a GUIDE to keeping your .NET applications secure šŸŽ.

The ONLY thing you have to do is enter your email to receive it for FREEšŸ¤‘.

šŸšØThis wonā€™t be around forever.

To maintain exclusivity, Iā€™ll be editing the article soon and there will no longer be a gift. So HURRY UP and get your guide to becoming a .NET security expert! šŸ‘‡šŸ‘‡šŸ‘‡

Get your guide for FREE


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK