I'd be interested in learning how to create gauges and meters, both linier and round that can be reused like the old custom controls. So one time you might use the liner gauge as a vertical thermometer and another time as a horizontal VU meter. You'd need ranges, tick marks, and etc.
Wow, yeah, that’s a pretty good use case for one of these. I might give it a go over the weekend and see how fancy I can get with it, and post the code or something. Nice idea!
Woot another new channel, Hope all goes well! -- Thanks for showing this. reminds me of my VB3 days where I wrote some custom controls (VBX files) for making screens look like LARS interfaces -- the star trek buttons, lines you see. Might have to give it a coat of paint now and try do them in MAUI :) -- Just watched your custom control video with the rounded button.
Because you use Invalidate(), dirtyRect will always refer to the entire area of your app to be painted. But, generally speaking, the dirtyRect could reflect a smaller area, say, if a portion of your app got covered then revealed. You can use this to optimize the amount of drawing you do if you realize you only need to populate the area specify by your dirtyRect. You definitely do not want to compute a new center point / radius based on dirty rect.
The theme I use is called “dracula”. - draculatheme.com/ . I got a little obsessed with it at one point and installed it everywhere, even my terminal lol.
@@ProgrammingWithChris Doing the same when I choose a new theme. 😁 Would be great to have the ability to set a system-wide theme in Windows for all supporting programs... one day...
As soon as i saw the draw method i got java flashbacks 😂 but nice to know this is in maui last time with graphics coding with c# was with my windows forms application. It was a pain but looked pretty good at the end i think
@@ProgrammingWithChris I know that a few of us out here are looking for instruction on integration of those native libraries and so, I would really appreciate it. Thank you.
Thanks for watching! Let me know if you write anything cool with Maui Graphics, I'd love to see some examples of what other people are doing with it! 🕘Timestamps: 00:00 - Video Start 00:09 - Intro To Maui Graphics 01:20 - How to use Maui Graphics In Your Xaml 03:02 - The Drawable Class in Maui Graphics 05:06 - The Math Behind Drawing The Clock With Graphics
Would it make more sense to have multiple drawables so that you aren't re-drawing the entire clock, minute hand, hour hand, etc. every second when only the second hand has changed? Or does that introduce more problems, like getting everything to line up?
Yeah, that's a good question. I know from my experience, redrawing these things isn't as computationally expensive as it sounds, especially in as long of a frequency as 1 second. So in this case I'd just do the whole object each time, makes things easier on the design part (as you mentioned) In terms of the performance difference between the two, I think that would just depend on the graphics engine that Microsoft.Maui.Graphics is using (which I think you can even tell it to use a specific one, like SkiaSharp). And honestly most of those are so fast that they're done drawing in just a few milliseconds, at most. Then obviously there is the difference in the code processing as well, so if you need to process 1million rows of data to draw your object each time, then yeah, that'd be a case where you'd want to break it up if possible, etc. Hope that makes sense.
I'd be interested in learning how to create gauges and meters, both linier and round that can be reused like the old custom controls. So one time you might use the liner gauge as a vertical thermometer and another time as a horizontal VU meter. You'd need ranges, tick marks, and etc.
Wow, yeah, that’s a pretty good use case for one of these. I might give it a go over the weekend and see how fancy I can get with it, and post the code or something. Nice idea!
Woot another new channel, Hope all goes well! -- Thanks for showing this. reminds me of my VB3 days where I wrote some custom controls (VBX files) for making screens look like LARS interfaces -- the star trek buttons, lines you see. Might have to give it a coat of paint now and try do them in MAUI :) -- Just watched your custom control video with the rounded button.
Because you use Invalidate(), dirtyRect will always refer to the entire area of your app to be painted. But, generally speaking, the dirtyRect could reflect a smaller area, say, if a portion of your app got covered then revealed. You can use this to optimize the amount of drawing you do if you realize you only need to populate the area specify by your dirtyRect. You definitely do not want to compute a new center point / radius based on dirty rect.
Thanks for showing, I didn't know drawing with MAUI would be so easy.
Oh, forgot to ask: what color theme do you use in the IDE?
The theme I use is called “dracula”. - draculatheme.com/ . I got a little obsessed with it at one point and installed it everywhere, even my terminal lol.
@@ProgrammingWithChris Doing the same when I choose a new theme. 😁 Would be great to have the ability to set a system-wide theme in Windows for all supporting programs... one day...
@@krccmsitp2884 this is an awesome idea 💯💡
I love F# too and I would love to talk about it more too!
As soon as i saw the draw method i got java flashbacks 😂 but nice to know this is in maui last time with graphics coding with c# was with my windows forms application. It was a pain but looked pretty good at the end i think
I like the topics that you have chosen in your videos.... do you think you could do a video with a "MAUI fresh" look at Bluetooth integration?
Yeah, I think those kind of platform integration topics are ones I’ll get to once I’m done with the overall framework, so definitely!
@@ProgrammingWithChris I know that a few of us out here are looking for instruction on integration of those native libraries and so, I would really appreciate it. Thank you.
Yeah this is awesome!
Thanks for watching! Let me know if you write anything cool with Maui Graphics, I'd love to see some examples of what other people are doing with it!
🕘Timestamps:
00:00 - Video Start
00:09 - Intro To Maui Graphics
01:20 - How to use Maui Graphics In Your Xaml
03:02 - The Drawable Class in Maui Graphics
05:06 - The Math Behind Drawing The Clock With Graphics
which theme do you use it looks beautiful
The VS theme is Dracula, which you can find in the extensions marketplace in VS.
Would it make more sense to have multiple drawables so that you aren't re-drawing the entire clock, minute hand, hour hand, etc. every second when only the second hand has changed? Or does that introduce more problems, like getting everything to line up?
Yeah, that's a good question. I know from my experience, redrawing these things isn't as computationally expensive as it sounds, especially in as long of a frequency as 1 second. So in this case I'd just do the whole object each time, makes things easier on the design part (as you mentioned)
In terms of the performance difference between the two, I think that would just depend on the graphics engine that Microsoft.Maui.Graphics is using (which I think you can even tell it to use a specific one, like SkiaSharp). And honestly most of those are so fast that they're done drawing in just a few milliseconds, at most. Then obviously there is the difference in the code processing as well, so if you need to process 1million rows of data to draw your object each time, then yeah, that'd be a case where you'd want to break it up if possible, etc.
Hope that makes sense.
Very helpful, thanks so much!
Any way to use this with Binding to draw shapes for items in an ObservableCollection or something?
I have the general problem that the Draw Method of IDrawable fires constantly when i debug on a real andorid device. Do somenone know this issue?
Thanks for the video. Regarding local db, Realm DB is way more better than SQL lite
Oh, interesting, i'll have to check out RealmDB, I haven't used it before. Thanks for sharing!
You are awesome
Just use skia