Drawing Graphics In Your Apps with Maui.Graphics

Поделиться
HTML-код
  • Опубликовано: 26 ноя 2024

Комментарии • 28

  • @rogerp5816
    @rogerp5816 2 года назад +6

    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.

    • @ProgrammingWithChris
      @ProgrammingWithChris  2 года назад +5

      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!

  • @harag9
    @harag9 2 года назад +1

    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.

  • @squan888
    @squan888 2 года назад +1

    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.

  • @krccmsitp2884
    @krccmsitp2884 2 года назад +3

    Thanks for showing, I didn't know drawing with MAUI would be so easy.

    • @krccmsitp2884
      @krccmsitp2884 2 года назад +2

      Oh, forgot to ask: what color theme do you use in the IDE?

    • @ProgrammingWithChris
      @ProgrammingWithChris  2 года назад +2

      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.

    • @krccmsitp2884
      @krccmsitp2884 2 года назад +2

      @@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...

    • @avidrucker
      @avidrucker 2 года назад +2

      @@krccmsitp2884 this is an awesome idea 💯💡

  • @metacapitalism5113
    @metacapitalism5113 Год назад

    I love F# too and I would love to talk about it more too!

  • @flobuilds
    @flobuilds 2 года назад +2

    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

  • @keithsummers1889
    @keithsummers1889 2 года назад +1

    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?

    • @ProgrammingWithChris
      @ProgrammingWithChris  2 года назад +1

      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!

    • @keithsummers1889
      @keithsummers1889 2 года назад +1

      @@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.

  • @xskodemedia746
    @xskodemedia746 4 месяца назад

    Yeah this is awesome!

  • @ProgrammingWithChris
    @ProgrammingWithChris  2 года назад +2

    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

  • @trevortrevose9124
    @trevortrevose9124 2 года назад +2

    which theme do you use it looks beautiful

    • @ProgrammingWithChris
      @ProgrammingWithChris  2 года назад +1

      The VS theme is Dracula, which you can find in the extensions marketplace in VS.

  • @Brad-Dean
    @Brad-Dean 2 года назад +1

    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?

    • @ProgrammingWithChris
      @ProgrammingWithChris  2 года назад +2

      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.

    • @Brad-Dean
      @Brad-Dean 2 года назад +1

      Very helpful, thanks so much!

  • @Elmigo94
    @Elmigo94 Год назад

    Any way to use this with Binding to draw shapes for items in an ObservableCollection or something?

  • @mirsad1709
    @mirsad1709 Год назад

    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?

  • @ahmedma527
    @ahmedma527 2 года назад +1

    Thanks for the video. Regarding local db, Realm DB is way more better than SQL lite

    • @ProgrammingWithChris
      @ProgrammingWithChris  2 года назад +1

      Oh, interesting, i'll have to check out RealmDB, I haven't used it before. Thanks for sharing!

  • @muhammedalikhan7559
    @muhammedalikhan7559 Год назад

    You are awesome

  • @mouna5252elle
    @mouna5252elle Месяц назад

    Just use skia