.NET MAUI Data Binding with MVVM & XAML [5 of 8] | .NET MAUI for Beginners

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

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

  • @dotnet
    @dotnet  2 года назад +163

    Correction: 09:10 - [ICommand] is now [RelayCommand] in the final version of community toolkit for mvvm
    Correction: 15:05 - [ICommand] is now [RelayCommand] in the final verison of community toolkit for mvvm

    • @HainnTheBurmese
      @HainnTheBurmese 2 года назад +17

      - I found a problem with ICommand
      - I went down to comment section to find other ppl who encourage this problem as well.
      - I found this comment.
      I can feel I am bless!

    • @kaseywahl
      @kaseywahl 2 года назад +8

      Why not update the video? The comments are full of confusion over this, and the video has only been out a month.

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

      @@kaseywahl we actually did do an update to the video here and hid the old one and added little pop ups here. There unfortunately isn't a simple way of replace a video directly in youtube.

    • @foobarmaximus3506
      @foobarmaximus3506 Год назад +2

      @@dotnet Who said it had to be "simple". You get paid to do this and do it right. Right? Do you know how many opportunities you lose by having an out-of-date video. If not, you should.

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

      How to add separate Model Class for Items so we can have View, Model and ViewModel?

  • @lukezeches2642
    @lukezeches2642 Год назад +26

    If you are also having trouble because the DeleteCommand isn't triggering, double check that your is wrapped inside a tag (with an s). Once I fixed that it started working.

  • @redstrike91dn
    @redstrike91dn 2 года назад +55

    My brain is incrementally exploding while watching the data-binding part :D

    • @Lanthiren
      @Lanthiren 2 года назад +19

      this seems unnecessarily complicated when its supposed to be aimed at beginners

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

      it looks hard but it's standard way in MAUI and many years ago in WPF

    • @STARCRAFT2OWNER
      @STARCRAFT2OWNER 9 месяцев назад +1

      @@Lanthiren i mean its functionality you need, so would be weird if he didn't explain it in these video's

    •  8 месяцев назад +1

      Well, welcome to MAUI for beginners series. I agree with you.

    • @BenDover_TheSecondaryScareGuy
      @BenDover_TheSecondaryScareGuy 8 месяцев назад

      What a POS way to do the bindings.

  • @magellan124
    @magellan124 2 года назад +28

    James explains this stuff so well. MS and the Maui team are lucky to have him.

  • @MahbuburRahman-uc7np
    @MahbuburRahman-uc7np Год назад +62

    After working with UI Frameworks like Flutter, VueJS, and React the MAUI DATA-Binding seems way too complicated. Too many lines of code to achieve a trivial task relative to other frameworks.

  • @parko1965
    @parko1965 Год назад +1

    Traversing up the stack beyond the DataTemplate, in one line of xaml, brilliant.

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

    James is the best. I love your teaching the most in RUclips. Life without you would have been critical😅 . I'm praying for your best health brother ❤

  • @ChineduOpara
    @ChineduOpara 10 месяцев назад

    This series is AWESOME. Perfectly targeted at people like me... TOTAL BEGINNERS!

  • @prakashsza
    @prakashsza 8 месяцев назад +2

    Watching xaml binding is my top feature that pulls me back instead of staying completely on flutter. Hope to see a v2 of this video, with maybe bindings to animations for examples from dribble

  • @Remusqs1
    @Remusqs1 Год назад +8

    It's been a year and still the SwipeView it's complete broken on Windows

  • @advanches
    @advanches Год назад +32

    Man, I got completely lost. This is supposed to be for beginners but it seems to assume that you already know how to develop apps. What should I learn before this? I'm a Unity developer with 10+ years of experience making games but zero experience making apps.

    • @MyReviews_karkan
      @MyReviews_karkan 6 месяцев назад +6

      I now feel very good about myself reading your comment.
      I thought I was just a moron. 😂

    • @halivudestevez2
      @halivudestevez2 5 месяцев назад +1

      beginner regarding MAUI

    • @zulucharlie5244
      @zulucharlie5244 3 месяца назад +2

      I'm a very experienced developer across many years/languages/frameworks, and this video just made me want to use anything other than Maui.

    • @amnher
      @amnher 3 месяца назад

      Me too im confused

    • @Gnarkson
      @Gnarkson 2 месяца назад

      If u dont understand this video, then u arent a experienced Unity-Developer.

  • @sausagesmcgee7079
    @sausagesmcgee7079 Год назад +10

    as someone who did some WPF in the past the 'INotifyProperyChanged' bit made me shudder... The toolkit seems cool, but in reality it works around stuff that Microsoft should of completely redesigned when approaching Maui. it's way, way, way too complicated. lots of nice stuff - but this is pretty heavy

  • @andrekohler5792
    @andrekohler5792 6 месяцев назад

    Having a WPF background, it is very cool to finally see the code generation for the properties and commands.

  • @rajatbasu2191
    @rajatbasu2191 7 месяцев назад +15

    As an experienced .NET Developer, I can safely say you are scaring the heck out of a beginner with this type of tutorial . Instead of taking interest in MAUI, they will run for the hills and never touch that with a 10 foot pole 😅😅

    • @MyReviews_karkan
      @MyReviews_karkan 6 месяцев назад +3

      Quite literally this. I've been working with it for a couple of days and I've been enjoying it. Now after watching this video, I think I'm done with it. I didn't even finish this video. It was ridiculous

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

      And they'll be dodging a bullet

    • @zulucharlie5244
      @zulucharlie5244 3 месяца назад +3

      Amen. First impression: This is straightforward and awesome. Second impression: This is miserably and unnecessarily complex, and maybe I should use another framework.

  • @HocineFerradj
    @HocineFerradj Год назад +18

    the MAUI DATA-Binding seems way too complicated. Too many lines of code to achieve a trivial task relative to other frameworks.

    • @rajadvamshi
      @rajadvamshi Год назад +1

      So true

    •  8 месяцев назад +1

      Please name few of "other frameworks".

    • @HocineFerradj
      @HocineFerradj 8 месяцев назад

      @ kotlin & Flutter

    • @rogerperkins
      @rogerperkins 8 месяцев назад

      Blazor

  • @amoke8336
    @amoke8336 8 месяцев назад +5

    why there's so many code just for click event ?

    • @hermanstokbrood
      @hermanstokbrood 3 месяца назад

      LOL, yeah I always wonder this also looking at some fancy tutorials of the big languages/companies in the industry. This code could and should be generated. It's not something you want to code over and over again.

    • @hubertt2777
      @hubertt2777 3 месяца назад

      @@hermanstokbrood u do it once and have it forever just copy and paste

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

    hello sir... my CommunityToolkitMVVM does not contain ICommandGenerator..... what to do??

    • @natureandfun62
      @natureandfun62 2 года назад +8

      ICommand has been renamed as RelayCommandAttribute
      in
      CommunityToolkitMVVM preview4

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

      @@natureandfun62 ty sir that was helpful

    • @kayhmreese2113
      @kayhmreese2113 2 месяца назад

      @@natureandfun62 thank you very much.

  • @clashclan4739
    @clashclan4739 2 года назад +13

    data binding are so hard to understand, why can't they develop like angular databindings

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

      As a beginner myself I am struggling. James has a great video that explains MVVM which might help understand the data bindings. I am a total learn by doing sort of guy so I won't really understand any of this at all until I start trying to build something new that isn't exactly what I am being walked through.

    • @halivudestevez2
      @halivudestevez2 5 месяцев назад

      it's a basic thing, angular sucks

  • @jeremyashcraft2053
    @jeremyashcraft2053 Год назад +2

    at 16:50 why cant we just explicitly bind to the viewmodel, rather than climb up the ancestry tree until we get to the viewmodel?
    (im new to C#/XAML/.Net)

    • @JamesMontemagno
      @JamesMontemagno Год назад +2

      The Command lives in the ViewModel... but we are inside of the DataTemplate INSIDE of the collectiview so the bindingcontext is the item itself (in this case the string) so you need to poke out to say hey actually go bind up to the viewmodel for this command

    • @RobertoGonzalez-mf3gq
      @RobertoGonzalez-mf3gq 10 месяцев назад

      @@JamesMontemagno then every time we are in the data template of some collection will it be nesessary to climb up to get the viewmodel? sorry for my english

  • @Assistedsarge
    @Assistedsarge Год назад +15

    I really don't like that the presenter uses a community toolkit to accomplish basic functionality like binding. I want to see how things are done vanilla in a beginner video.

  • @MarcoLana-n7s
    @MarcoLana-n7s 11 месяцев назад +17

    this was insanely complicated

  • @tuppas
    @tuppas Год назад +1

    I am having some issue when I try to run in my iphone. I have developer tool on and the app installs but it cant run. it just shows a quick moment like it is loading but then shut off. I check credentials and all of apple developer tools but nothing helps

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

    Welcome Back James

  • @IqbalKhan-sc3mh
    @IqbalKhan-sc3mh 2 года назад +1

    hi how to update BindingContext data from other page?
    I have two pages ProductPage and ProductAddPage so how to update BindingContext of ProductPage from ProductAddPage.

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

    Hi! Thanks a lot for the video! I'm trying to repeat binding of the DeleteCommand, but it can't hit a breakpoint into the Detete(string s) function of view model; How can I debug it and understand what exactly went wrong?

    • @omarsebakhi
      @omarsebakhi 2 года назад

      Did you find a solution? I have the same issue!

    • @omarsebakhi
      @omarsebakhi 2 года назад +10

      For me, I was missing the:
      Now it works.
      (I was already using [RelayCommand],
      but surrounding
      with
      solved my problem.)

    • @quinndaly4283
      @quinndaly4283 2 года назад

      Still having the same issue with the delete command

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

      @@omarsebakhi Same for me. I was missing . Adding that fixed my problem. Thanks for posting.

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

      @@SimspaceDev Glad to hear that :) you are welcome

  • @sakabas28
    @sakabas28 11 месяцев назад

    Always Top Notch Session 🤗

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

    At around the 5:00 mark, the presenter says "
    it will set the code behind text value and then raise this property change notification, which means that the entry will automatically be updated and vice versa. The entry is automatically two way data bound, which means if we enter text here will automatically set the value right here in our code behind.". Can someone please explain why that is happening - is the name Text special? I didn't see anything in the that suggested it was bound to anything.
    Edit: OK, I've watched further in the video, and once they've stripped out all that code, at the 7:42 mark the author goes into the and binds it to the Text property - now that makes sense!

    • @CeNeJaC94
      @CeNeJaC94 2 года назад

      Yea but later he used plugin that alredy did that for him u can see it at 7:10 mark it says public String Text thats the one he is binding at 7:42 mark

  • @abial109
    @abial109 Год назад +1

    How to add separate Model Class for Items so we can have View, Model and ViewModel?

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

    I haven’t seen a pachinko machine in years. I loved playing them as a kid.

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

    Why does the items property bind8ng work even when it's marked as private?

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

    how can I bind a list of a list ?
    like List manufacture [ford-tesla-mercedes-etcetc] which has inside a list of model List carModel [ka-fiesta-puma-etc]
    Thanks!

  • @johannesgp18
    @johannesgp18 8 месяцев назад

    Does the ObservableCollection need the [ObservableProperty] annotation?

  • @Europedesign
    @Europedesign 5 дней назад

    I find all the videos very nice and detailed, which is very useful, but personally, I can't concentrate with the background music playing when I need to focus on something. It can distract my attention.
    The reason is that English is not my native language, so I focus on that first and then on the code. Still, your videos are very good. Well done, keep it up!
    😊

  • @stevemonk2742
    @stevemonk2742 8 месяцев назад

    Been programming for years (decades) in various ways (mostly procedural code) - so not really a beginner per se - however, this video and the content just went way above my head. Plus, when I installed the MVVM toolkit mentioned - it has errors all the way through it - so I could not complete the follow-on pieces. Really a shame as did want to try and work my way through this. So here is my question - does anyone have suggestions about what I should learn BEFORE I try to go through this again? Note that I do not know C# (yet), nor XAML (yet) and I have not used visual studio before (so all aspects of this are new to me) - based upon this - does anyone have suggestions as to where I should really begin? My end goal is to write some apps (mainly for IOS) - but cross platform may be applicable. Wanted to use this MAUI approach so I can postpone the need to acquire a Mac until I have gone somewhere down the road. Of course I could just bite the bullet and decide to go down the xcode/swift route - but I really want to develop on the PC platform as that is where I have worked for years. Suggestions as to a route for learning would be beneficial (e.g. C# first, then XAML, and only then look at MAUI for example).

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

    the swipe thing don't function in windows machine. Only android emulators. Now, where is the cross platform in that?

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

    The SwipeItemInvoked command does not work in my version. doesn't work with a COMMAND either. Did this work for anyone else?

  • @vasjakur
    @vasjakur Год назад +36

    This is ridiculously overcomplicated. What should have been something like "bind = myObject.myProperty" is now a bunch of code spread to several files.

  • @tech-man8751
    @tech-man8751 Год назад

    James do we have [DependsOn] attribute in CommunityToolkit. Mvvm?

  • @cameronleebell97
    @cameronleebell97 2 года назад +4

    as of CommunityToolkit.Mvvm 8.0.0-preview4 ICommandAttribute has been renamed to RelayCommandAttribute, for anyone else having issues with that

  • @bakerct90
    @bakerct90 2 года назад +4

    Why not just bind the DeleteCommand? If it was just to show us what was possible, that wasn't apparent.

  • @soumyadipmajumder3450
    @soumyadipmajumder3450 Год назад +1

    Mvvm feature is cool in dotnet MAUI.

  • @EngOmar-bk6ox
    @EngOmar-bk6ox 3 месяца назад

    can you explain how to print in .net maui (print bill for example)

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

    Thanks for this! I heard you say "Let me pull over my source generators" and I had to pause. I had no idea that was there in the Solution Explorer and I've been unable to navigate to the generated code (Version 17.4.0 Preview 2.1). Even though it's not what this video was about, it helped save me a bunch of frustration.

    •  8 месяцев назад

      I saw it presented in Nick Chapsas vide few months earlier, I mean code generators. But the author is MS guy, so he could know it earlier.

    • @terryhenning8325
      @terryhenning8325 8 месяцев назад

      @ I primarily use Rider for MAUI and since my post above, both Visual Studio and Rider are much better at making the generated source available if you want to see it, or hidden if you don't need to see it.

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

    SwipeView doesn't work on Windows App?

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

      Swipe with two fingers and it’s will work

    • @HainnTheBurmese
      @HainnTheBurmese 2 года назад

      @@esazebari1879 How can I do it on my desktop PC

    • @esazebari1879
      @esazebari1879 2 года назад

      @@HainnTheBurmese give me something which i can contact u , and i will send u solution

    • @jonathanj2666
      @jonathanj2666 2 года назад

      It doesn't work with the windows emulator. You'll need to use the android emulator for that.

    • @JamesMontemagno
      @JamesMontemagno Год назад +1

      It works if you are on a touchscreen device. There are now context menus: devblogs.microsoft.com/dotnet/5-dotnet-maui-desktop-features/#context-menus

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

    hello James, I have a problem with my app, I use an Entry to enter data and these data will be transferred to a Label in another page but it doesn't work with my view collection. Can you help me? please

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

    I am able to swipe but the DeleteCommand is not getting triggered, does not hit the breakpoint, actually it does not do anything and it is frustrating when there is no error but just dead silent

    • @alexalmeidajr.9203
      @alexalmeidajr.9203 2 года назад +7

      Verify if you forget to put the inside the .
      I had the same issue, becouse my code was like this


      And the correct is

    • @StewardBopape
      @StewardBopape 2 года назад

      @@alexalmeidajr.9203 That is exactly what I missed, Thank you

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

    Do i need to use this MVVM model when I am connecting to a database?

  • @iamarante9110
    @iamarante9110 2 года назад

    Could you tell me why the data binding of the swipeItem works for me in debug but not in release. Greetings.

  • @Reignxxds1
    @Reignxxds1 3 месяца назад

    Error (active) XC0000 Cannot resolve type "clr-namespace:SampleApplication.ViewModel:ViewMainModel". SampleApplication (net8.0-android34.0) can somebody help me about this error

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

    Watched this series last year and I am now confident to start using .NET MAUI for my mobile app development going forward.
    I just love your teaching style. It is so easy to follow.
    Please drop your x handle so I can follow you and ask few questions.
    Thanks a bunch.

  • @WolfRose1Studios
    @WolfRose1Studios 9 месяцев назад

    2:40 Make sure that the program isn't still debugging still or it won't allow you to create and rename new folders.

  • @edinetgrunhed6000
    @edinetgrunhed6000 Год назад +8

    data binding getting complicated, i'm sure there will an easy method in the future

  • @dostonbekislambekov6469
    @dostonbekislambekov6469 3 месяца назад

    I need help please, I'm sitting over 24 hours on this error
    I did everything like in the video, but I keep getting "Biding: Property "DeleteCommand" not found on "System.String" " can anyone help me figure out why is it happening please?

  • @androidsavior
    @androidsavior 10 месяцев назад +1

    it take 1 minute and 10 seconds to build the almost empty android app on a powerful computer, is that normal ?!!

    • @androidsavior
      @androidsavior 10 месяцев назад

      I fixed that by removing 'builder.Logging.AddDebug();' line from MauiProgram.cs and just enabling it when neeeded

    • @androidsavior
      @androidsavior 10 месяцев назад

      it takes less than 10 seconds to compile

  • @quantume7143
    @quantume7143 Год назад +1

    Nice video. I want more like this one :)

  • @Lee-ck4me
    @Lee-ck4me Год назад

    Hi, I watched the full video and cant figure out this problem. When i try to add something to the list it doesnt do anything. I added a breakpoint and noticed the Add command never gets called?

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

      Did you make sure to register your viewmodel and set it to the BindingContext? Checkout the final solution in the show notes.

    • @Lee-ck4me
      @Lee-ck4me Год назад

      @dotnet Hi thanks for your reply. I can't find the final solution in the show notes?
      Edit: Never mind, I found the problem after comparing the code. Thanks for the great video

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

    In lesson 5 of 8... Some on knows why in the code we add(Text) and Delete(string)???? (Why we don't did the same add(Text) and Delete(Text)???

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

      Because Text is bind to "Enter Task" Entry and you want to delete items from the list with the swipe function.

  • @oz4232
    @oz4232 8 месяцев назад +3

    i think this toolkit makes things harder to understand and complicated

  • @sebastianszafran5221
    @sebastianszafran5221 2 года назад

    Hi! Could anyone give me an advice, what's the most efficient way to make button's two images changing by bool property binding in Maui's approach? Not sure if I should create a converter for it, or if there is a simplier way. Thanks in advance!

  • @RaphaellTk
    @RaphaellTk 11 месяцев назад

    i'm use Mvvm version 8.2.2 and not it works. For beginners in programming it is very difficult.

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

    Ok, you are binding to a ViewModel -- which, in my opinion, looks like a "mutant" because it's a kind of Model plus some infrastructure (INotifyPropertyChanged, or whatever monstrosity that toolkit nuget package decides to generate for me in the behind of the behind of the scene).
    But if I have a weather sensor sending me humidity and temperature, it will actually send me a Model like { temp: 25, hum: 75 } -- do I always have to translate this Model into a ViewModel (and eventually back)?

    • @JamesMontemagno
      @JamesMontemagno Год назад +1

      You could simply have the Model as a public property that gets notified when it changes and it would re-evaluate.

  • @dodiwe
    @dodiwe 10 месяцев назад +3

    uff, this toolkit makes it first complicated af

  • @fieryscorpion
    @fieryscorpion 2 года назад

    Great video series!

  • @travelingbard1
    @travelingbard1 3 месяца назад

    Wish this went over writing the code out instead of leaning on the community toolkit for view model interactions. Then again, I'm doing a class project and community toolkit isn't allowed, so I might be a bit biased/desperate.

  • @JonGraf-b9g
    @JonGraf-b9g 11 месяцев назад

    James I am trying to setup a login Page to identity. when the user clicks the button I call a login procedure which is a task. It is working fine. how ever I would like the login procedure to load a bunch of data and in between the calls push status to the user on what data has loaded. I can not figure out how to do it.
    My code does not run properly. the ui does not update. I use statehaschanged. please help.

  • @rafaatashour
    @rafaatashour 2 месяца назад

    i don't understand why we need to register dependency ??

  • @HackelSchorsch
    @HackelSchorsch 2 года назад

    How would you bind a command to a CheckBox? It has no Command property.

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

      For a Checkbox you would be binding to the IsChecked property learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/checkbox?view=net-maui-7.0

  • @Ahmet-nd5ct
    @Ahmet-nd5ct Год назад

    i have done exactly the same but DeleteCommand is not working. i dont know why?

  • @梁家河的沼气池
    @梁家河的沼气池 Год назад

    Every time I want to create a view model in WPF I have to write a lot of boilerplate code like this, which can be mostly avoided if I use something like React.js. Is there any improvement in MAUI to help us to avoid these coded?

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

      Take a look at the mvvm toolkit which i used: learn.microsoft.com/en-us/dotnet/communitytoolkit/mvvm/

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

    When deleting any item from the list and adding a new one later, an unhandled exception is raised "Value does not fall within the expected range."

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

      @agustinbcu I'm having the same issue, and pulling my hair out with frustration. No idea what's going on, an unhelpful error message, and no stack trace either. Did you ever figure out the issue?

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

      @@theagemaway sadly no. I was evaluating the platform for new development, but I move in other direction. Probably when the platform becomes a real release, because now do looks a stable version to me.

    • @bcar456
      @bcar456 11 месяцев назад

      the same error

  • @caiocamargoantonio
    @caiocamargoantonio 2 года назад

    (Like: Hein Lin Htun 5 days ago.... ->>>>>> SwipeView doesn't work on Windows App... For what reason???? Hope we get answers to our comments....

    • @JamesMontemagno
      @JamesMontemagno Год назад +1

      It works if you are on a touchscreen device. There are now context menus: devblogs.microsoft.com/dotnet/5-dotnet-maui-desktop-features/#context-menus

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

      @@JamesMontemagnothanks, that was bugging me too!

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

    Good tutorial but: after installing the app on my smartphone the entries disappear after a day or so, does someone know why?

    • @Assistedsarge
      @Assistedsarge Год назад +1

      Any new entries will be stored in RAM and will disappear when the program restarts.

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

      @@Assistedsarge So I have now an app thats complete useless...

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

    Hi James, I feel lucky finding your videos on this subject.
    Could you explain why in viewModel the defined string property "item" or "text" got capital case when you assign them??

    • @94Chef
      @94Chef Год назад

      Hi,
      i hope i'm not wrong. I thing with the Attribute [ObservableProperty] there will be created an Property which have capital case.

    • @imanidioli
      @imanidioli Год назад +1

      @@94Chef I forgot about my comment, you are correct I found out when watched again

    • @wtfitsdrewbritton
      @wtfitsdrewbritton Год назад +1

      The casing of property, method, and class names in C# follows the Pascal casing convention. Similar to how in Java camelCase is used for method and property names

    • @beelzaBob
      @beelzaBob Год назад +1

      I can tell you. You remember before we replaced the code with the decorators?
      ([IObservableProperty], [ICommand])
      IF you remember, the declaration of the "string text;" had getters and setters. It was something like:
      private string text;
      public string Text { get => text; set { Text = value; OnPropertyChanged(nameof(Text))}}
      Well, that code is still there, you just don't see it because of the decorators. If that code was still there, would the "text" "Text" still confuse you? Also note the same thing happened with the
      ObservableCollection items;
      That list is referred to as Items elsewhere in the code for the same reason.

  • @MegaAmafia
    @MegaAmafia 2 месяца назад

    Items not accessible?

  • @DonkeyFrog
    @DonkeyFrog 2 года назад +9

    MAUI seems so messy and disorganised

  • @Mohssen49
    @Mohssen49 2 года назад

    Thanks for excellent videos!!
    Why am I not able to see the Items on the Windows Machine Emulator in MVVM & XAML [5 of 8] .Net Maui. It's working fine on Android's Emulator. Appreciate your answer!

  • @maestrowilliam
    @maestrowilliam 2 года назад

    why can't be binding in the XAML?

  • @-pcmr-108
    @-pcmr-108 2 года назад +10

    This is why I really dislike .net maui/xamarin. Helpful videos get posted and they are great for a time I'm sure, but then someone changes the name of something, and makes it such a hassle to track down the fix, and then you end up in situations like this where even the corrected code doesn't work as there are multiple breaking points. And this is less than 2 months old.
    For anyone else wondering, ICommand is now RelayCommand, and simply changing that will get you up to the swipe delete, which I still haven't figured out.

  • @sangachidam3219
    @sangachidam3219 2 года назад

    Excellent video. Thanks, I could not see any video showing maui on Iphone or deploying ios app. can you do one please.

  • @ihsanakarsu-bilisimteknolo3954
    @ihsanakarsu-bilisimteknolo3954 3 месяца назад

    It's hard for a beginner in software development. I reduced the playback speed of the video, I hope that I will understand this time.

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

    Can I confirm ObservableCollection is depreciated ?

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

      Hi not really sure anyone is reading this, there in NO ObseravbleCollection.

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

      ObservableCollection has been around for many years: learn.microsoft.com/en-us/dotnet/api/system.collections.objectmodel.observablecollection-1?view=net-8.0

    • @foobarmaximus3506
      @foobarmaximus3506 Год назад +1

      @@JamesMontemagno That does NOT answer his question. Has it been deprecated? It's a very simple question.

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

    J'ai une erreur with vm ,???

  • @chrislamb4723
    @chrislamb4723 2 года назад

    Trying to troubleshoot a problem with Windows Machine build.... After entering items into MyList then deleting just one item, when I try to add another item I get a crash that I cannot trace... "Value does not fall within the expected range." Figuring this issue was my fault, I cloned/ran your app and had the same problem for a Windows Machine build.
    I placed breakpoints in the Add() method and the app makes it though fine with appropriate action until stepping past the ending bracket of Add(), which sends me to exception handling in App.g.i.cs. Another observation... the app works as expected without crashing in the Android Simulator as well as directly on an iPhone (local iOS). I have not tried the app on MacOS yet.
    I am on Windows11 with VS pre6.0
    Thank you for this fantastic tutorial and all your hard work!

    • @-pcmr-108
      @-pcmr-108 2 года назад

      How did you get delete to work? I can't get the Delete Command to fire at all.

    • @chrislamb4723
      @chrislamb4723 2 года назад

      @@-pcmr-108 There are a few ways for me to interpret your question. What I'll give you is what I experienced while trying to troubleshoot Delete not working for me... For windows machine build, I thought my delete wasn't working as well. I could not get the Delete button to show while trying to swipe with any gesture I could think up using a mouse. What I found was a two finger swipe on my trackpad worked.
      I had no problem using the mouse for delete in the android emulator.
      If that isnt a solution for you, I would grab a copy of James' mauiApp code from github and compare operations and code with yours.
      I hope that helps.

    • @majesticjester1
      @majesticjester1 2 года назад

      I get the same error. It works perfectly on Android emulator but crashes on Windows. CollectionView works fine without the SwipeView. They should show these demos working on all formats, not just the ones with no bugs. Or at least tell us which formats are broken.

  • @stevea2132
    @stevea2132 Год назад +3

    Setting up data-binding is WILDLY unintuitive. You would never discover what to do if you didn't have access to this video or some other tutorial.

  • @MrClintM
    @MrClintM 2 года назад +4

    command does not trigger event. SOLUTION: Use instead and place a child label or other visual elements inside there. As a test, just use .

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

      Not sure what's broken but neither SwipeItem's Command or SwipeItemsView's Command bindings are working for me

    • @KaganDitten
      @KaganDitten 2 года назад

      Non of the solutions are working for me eigher :(

    • @KaganDitten
      @KaganDitten 2 года назад +4

      Found the solution :) Name the ContentPage as x:Name="thisPage" and change the command to: Command="{Binding BindingContext.DeleteCommand, Source={x:Reference thisPage}}"

    • @marctalcott5613
      @marctalcott5613 Год назад +6

      Try this. It finally worked for me with this. I kept having hard to find typos in the code until this one.

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

      @@marctalcott5613 Thanks. This was the correct solution.

  • @caiocamargoantonio
    @caiocamargoantonio 2 года назад

    Hi there! Some one knows where I can learn the following sintax (Command="{Binding Source={RelativeSource AncestorType={x:Type viewmodel:MainViewModel}},Path=DeleteCommand}")?

    • @PetersTrickAccount
      @PetersTrickAccount 2 года назад

      Look for this vid: Learn .NET MAUI - Full Course for Beginners | Build cross-platform apps in C#
      It's explained at 2:34:43

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

      Checkout learn.microsoft.com/en-us/dotnet/maui/fundamentals/data-binding/relative-bindings?view=net-maui-7.0

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

    Good lord, .Net is such a mess. Good to see a simple topical video about it that's not 3 hours long though.

  • @talha-safdar
    @talha-safdar 6 месяцев назад

    Community toolkit does not work

  • @clashclan4739
    @clashclan4739 2 года назад +9

    that background music is so annoying

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

    Thank you

  • @pwill4real855
    @pwill4real855 7 месяцев назад

    Maybe I’m wrong, but couldn’t you just have a static class, and just assign the variables to the class variables.

  • @craigcpedersen
    @craigcpedersen 21 день назад

    I wish the presenter would please explain the difference between uppercase "Text" vs. lowercase "text" in thse videos. It gets very confusing. Way too many concepts thrown at me at one time.

  • @Ifæn21
    @Ifæn21 Год назад

    The only thing I felt that this tutorial was missing was when you have a ItemSource of a ObservableCollection of a Model instead of a string, because I had this problem trying to bind a property but the property called GroupName wasn't in the ViewModel but in a Model separated, so when I tried to make a Label with a Text={Binding GroupName}, it couldn't find it until I did this:
    xmlns:Model="clr-namespace:Test.Models"
    xmlns:ViewModel="clr-namespace:Test.ViewModels"
    and inside the CollectionView, I did this:













    So, instead of using x:Type x:String, I had to obtain the property GroupName from the Model AccountGroup and User from another Model called Account

    • @Ifæn21
      @Ifæn21 Год назад

      Also now I noticed, that's the reason why James did in 8:11 the x:DataType, so he wouldn't have to do inside the Entry --> or something similar I think
      Now I wonder, it's possible to make multiple x:DataType inside a ?

  • @Benni720
    @Benni720 10 месяцев назад +1

    that's an awful lot of code to get a string from a to b.

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

    Great tut, but that music is very annoying. Hard to focus.

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

    There is not enough "why" in this video. There is only "How". By the end i had forgotten what i did in the beginning.

  • @witch-doctor
    @witch-doctor Год назад

    was following it, but then it became very complex and hard to understand real quick as a beginner :(

  • @eladyehuda8827
    @eladyehuda8827 6 месяцев назад

    It's a shame that you don't have many tutorial videos, both more in-depth and with an emphasis on building a UI interface for Windows, anyway by default the exe file created after running compilation, in the debug folder doesn't work, so manually you have to add settings in the file of the solution itself The project, which is really not clear to me, why did Microsoft do this in the first place, as opposed to all the types of projects that exist in Visual Studio related to C#? And another thing that I don't quite understand, why should it run as a Windows Machine and not in the usual way when the focus is on a Windows application, in terms of the part that running the program itself takes more time than just running another project to build a UI for Windows

  • @Seawolf159
    @Seawolf159 2 года назад

    awesome editor, making use of his obnoxious hand movements (cwl)

  • @AnoNym-zf9ei
    @AnoNym-zf9ei 2 месяца назад

    I left a good Android Development job because of MVVM. Now it is in MAUI, too. 😒