That's right .NET Maui preview nine this year, almost at 10.
Oh my goodness.
I can't wait for it.
I'm going to break down everything you need to know about this release
and so much more so tune in.
Hey everyone.
I'm James Montemagno.
I'm back with yet another.NET MAUI preview video.
You keep watching them.
So I keep making them and tell me that you like on my answer, all your questions,
of course, in the comments below.
Now, of course, before I get into this, week's down in Miami for you nine jam
that like button down there, ring that notification bell hit subscribe to all
the things that you know, you wanna do.
It really helps out the channel.
And this video goes into that YouTube algorithm of goodness.
All right, let's get it.
Dot net Maui preview nine.
Now, if you watch my previous video on preview eight, you would have seen
that that was a mega lease with the visual studio installer, taking care
of all the bits and pieces that you need to get up and running with.net.
Now Donna and Maui is the Dunham multi-platform app UI for.net,
which means you can build a single cross-platform app for iOS, Android,
Mac, and a windows, all from a single code base and a single project.
And don't forget.
You also have blazer integration into that puppy as well, which means that you can
build a web application with blazer and hosted in the dinette Maui application.
So you can bring your web app everywhere or blend the two pieces of technology
together to get some native UI and some web UI definitely take a look
at Donnette Maui blazer as well.
And I'll be making videos on that too.
All right.
Well, let's get into it.
Dinette Maui previously.
Here we go now as always, David has a fantastic blog post talking about all
the new enhancements in this release.
So you'd have, I just want to kind of read this.
I don't know why you're watching this well, because
you want to see it in action.
There's a bunch of cool new things.
A box view, indicator, view, image, view, web view, have
all been updated, ready to go.
That means it had the new handler implementation, which is super awesome.
Now, one of my favorite new things.
Orders corners and shadows are here as something that the community has
been asking for for a long time.
And they're all packed into this release.
Thanks to the brand new Microsoft Mallee graphics library as part of.net Maui.
That means you can do cool things like this.
You can put these borders in it.
You can have shapes.
You're gonna have rounded corners on just about anything.
Look at this, you have a border and you wrap it in whatever you want.
So here's a label.
The boy, the boy.
Has a label inside of it and you give it a stroke and is around
rectangle has all sorts of stuff.
You can give a different thicknesses, different backgrounds, different stroke,
thicknesses, the stroke color that you want, the padding that you want inside
there, you can put anything on it.
Fantastic.
There's all sorts of other stuff here, too.
Stroke dash array, offset line cap.
The things that you'd expect, but.
What about shadows?
You can add a shatter to anything.
This is a little dinette.
Baso so cute.
Oh my goodness.
Look at it.
So cute.
Boom.
What do you do?
Every single image.
Just about her.
Every single control, I should say, just about as a new shadow
property and you give it a shadow.
There you go.
That's all you got to do.
Now other things to talk about here is that the team has been super laser
focused on startup time and performance.
And here they break down quick, Android startups specifically.
Now Donna Maui ships with startup tracing profile enabled.
This is super awesome.
This is the thing that will reduce your startup time by more than like 50%.
When you're building from the command line, you can also
pass it the argument to do it.
So check this out here.
We have the sort of the time reductions with, uh, Git startup
time, the AOT startup time and the profiled AOT startup time too.
This is really cool.
You get a 51% reduction profiled a little bit, you know, a little bit faster.
Um, there there's 51% of the original, the 1.4 second.
So it means your apps are starting in under one.
For and Maui, if you have just an Android app without Donna Maui 0.3, zero seconds.
Oh my goodness.
And the app size has also been reduced as well, under 17 megs AOT 44, but profile
day IOT, that's the winner there, right?
It's actually faster and smaller to the profile AOT.
Now don't forget.
You're like, wow.
44 megabyte.
Well, James, that's really big.
Well, that's an AP K and Android package.
Now don't forget that you're not submitting those to Google anymore.
You're submitting app bundles.
That means that whatever that size is cut it in half because that's, what's actually
going to be delivered to your users.
At the end of the day at bundles are amazing.
And of course have first-class.
Now I also love here that there's entire ecosystem blooming of course, around
open source packages for Don and Maui and amazing control component vendors
out there like dev express sync fusion.
And Telerx a definitely give that a look.
All right, let's implement some code.
I'm ready.
I'm just gonna copy and paste some code and put it in the.
So it was pretty cool here.
I just have a file.
New application, no big deal.
It's going to replace this label.
Boom.
Now I haven't saw, uh, XAML styler, um, as well, put a link in the show notes
below it to install that separately into vs 2022, but it's here now.
Here.
There is no primary brush, so let's do a, uh, primary.
What is it?
Primary color.
Is that what I have?
Let's look in my app.
XAML primary color.
Perfect.
All right.
It's purple.
So what we've done here, we have a border with some padding
background, color, stroke color.
Ah, I don't really like that.
It's purple on.
Purple.
Let's do a.
Let's do that.
Then what we're putting inside of here is a round rectangle and a quarter
radius of 40 0, 0 40, and I've added a 40, 40, 40, and we'll actually
see that that's the corner radius on the different corners that we have.
So top left top, right.
Bottom right bottom line.
I'm pretty sure that's what it is.
We'll double check when we run it.
And this is just going to say Donna Mallee preview nine, and
then it has the same counter.
So it'll increase.
Let's also come down to our good old friend or image down here
and let's add a shadow onto it.
And that's pretty cool.
So come down to our image.
There we go.
And here we can say image dot shadow, just like that.
And then you have it shadow just like that.
Now, of course, I'm just going to go ahead and paste that in here, but you can
see just the IntelliSense lights it up.
We'll reformat the code, and this will be a brush of black, a pasty of
0.8 radius of 40 and offset of 2020.
Those are very, very standard sort of metrics of doing drop shadows
and Photoshop forever, basically.
So those should be very, very familiar.
All right.
So we got our application.
Um, actually it's up and running.
Look at that's already 30 there.
Boom.
That was really quick build and deployment.
That was really, really cool.
And look at this, you got your counter with all the rounded rectangles on there.
The click me going up there and then the great drop shadow on the dotnet bot.
Now let me see over here.
Cause if you wanted to, we can make that stroke thickness.
Let's say 15.
Um, and then if we were to make that back to zero, let's see what that looks like.
One more time.
Uh, my hot reload has been a little bit iffy and this release.
I'm not sure why.
So I might have to do a little debugging there, but man, this thing loads.
So fast.
Look at that.
There you go.
Check that out.
That's pretty cool.
Zoom in on there for ya.
Oh, that's pretty neat.
And then it automatically just automatically does everything
for you and you're good to go.
And there you have it.
There's borders, rounded corner radiuses, and drop shadows for your applications.
The rest is sort of the same.
So there's not a real big difference.
As far as the new single project, any of the windows things you still
need to remove the commented line of coder or comment back in the
line of code or return it to normal.
If you will, with.
The correct phrase is there to enable the window support.
And of course, if you're looking to get Matt catalyst support, you need
to install the bits over on your Mac.
And of course, Maui check is available there too, but I do want
to run through a few other things that are coming in the future and
that you can participate in today.
So let's check.
The next thing I want to talk about is the Dyna Mallee community toolkit.
Brandon has been working with community members to help transition
the Xamarin community toolkit to the dinette community toolkit.
And they're finally ready for community toolkit contributions.
I'll put a link to this blog post below, but they have a full Kanban board, all
set up a whole workflow, all set up.
You guys are putting all your controls and all your kids.
Right in to the dynamic Maui toolkit, which is super awesome.
I love the Xamarin community tool kit too.
I don't forget.
Well, preview nine is out today.
Preview 10 is obviously going to be on the way.
And of course, if there's going to be a lot of information at dotnet
comp 2021, which I'll definitely be part of and hosting some of it
there too, and I've been helping with keynote and Nassau, so good.
We're making some amazing applications for blazer and Donna Maui.
So definitely tune into that.
You can just hit the, save the date.
It's free.
It's online, it's happening November 9th through the 11th,
and you can check out the entire.
Check this out, you got all these sessions, so many good things or the
Hanselman speak and Kendra speaking, Kathleen and Don Maddie's there.
Oh my goodness.
So many people.
All right.
Some other things happen in that I want to tell you about too, is that changes
are coming hopefully to the templates.
Uh, Just this week, decided to make a big pull request, to just completely optimize
and redo the Don and Maui templates with dotnet six and C sharp 10 features.
This includes implicit and global usings scope namespaces and so much more
because I was playing a lot around with the Donna and new council and blazer
and web API, and I was inspired by it.
So what this means.
Is that there's going to be these new global using statements.
Now these beat might be in the templates or maybe they'll actually be part of
Don and Maui still to be decided, but this means you don't have to copy and
paste all this stuff all over the place.
There'll be brought into your entire applications.
You never have to type using Microsoft on Maui ever again.
It's implicitly brought in, uh, or with these global usings also
it'll enable implicit using.
So for all of your system and all of your.
This is some tasks and all those other things will just be there.
This is what this will look like.
Then at the end of the day, is that when you create, oops, oops, this is what this
will look like at the end of the day, is that you'll just have this using Maui
application up top, and then down here, you'll just have public partial class.
That's it?
No more namespace squiggles, no more tons of usings, anything like that?
Super minifies it, which is great.
And then finally, It will also bring in all the startup code that is needed
for dinette, Maui essentials in your Android application, it'll all be done.
And of course I am collaborating closely with Matthew Liebowitz, um,
to actually make this even easier and have less code inside of here.
But for now it's going to be in there, which is pretty.
Now the very final thing I want to talk about is that many of you have been
asking, where is my.net Mallee 1 0 1.
Do you have to make an, all of these Xamarin one-on-one videos and going,
oh, you know, Donna Maui is set to GA in Q2 of 2022, and there's going to be
a lot of changes to Donna Maui itself, to the templates, to visual studio.
And it's hard when you release a video and, you know, everyone goes to it
and they watch it and things change, or I'm just been holding off on that
big initial push for creating a lot of brand new Dunham Maui content with it
doesn't mean that I don't have content that applies to Donna Maori today.
That's why I created the Donna Maui one-on-one playlist.
Now this is a collection of all of my videos from Xamarin 1 0 1 and.
And anything else that I've done on the channel, like compile
bindings, for example, all those things apply to Don and Maui.
So now you'll see that I've updated the titles to say Sam reforms and Don
Maui and dinette Maui, and on M Maui.
Um, so inside of here, right?
So I put those all in the title, all in this playlist.
I'll link it down there and I'll even put it up over there,
wherever it is in the corner.
So check that out.
If you want more.net Maui.
Goodness.
Listen, I'm super appreciative of every single one of you that have
joined the channel that has been watching the videos of leaving
comments, hitting the like button.
I really appreciate it.
Have a lot of fun things planned for the channel.
We're super close to hitting 20,000 subscribers just a year ago.
We really kicked off this channel and I had like, no, no subscribers at all.
I didn't have hardly any videos.
I really appreciate all of you taking time out of your days out of your evenings.
To spend it just a little bit of time with me and watch my video.
Thank you all again so much.
And don't forget to hit that like button subscribe and hit that notification bell.
Really appreciate it.
Have a good.