Xamarin.Forms ListView - Everything you need to know (& .NET MAUI)

Поділитися
Вставка
  • Опубліковано 17 гру 2024

КОМЕНТАРІ • 138

  • @michaelfelleisen6424
    @michaelfelleisen6424 3 роки тому +21

    Great video!
    If you are having trouble with an error along the lines: "Property not found" around ~ 8:00 you have to add another namespace in your
    xmlns:model="clr-namespace:[YourProjectName].Models"
    and tell your which DataType you want it to use like this

    • @michaelfelleisen6424
      @michaelfelleisen6424 3 роки тому +4

      Alright. At 12:00 he gets the same error. Should have watched the video a little further :x

    • @JamesMontemagno
      @JamesMontemagno  3 роки тому +4

      live coding :)

    • @ThyVincent
      @ThyVincent 3 роки тому +2

      Thank you for us fellas who like to jump ahead

    • @curiosity9283
      @curiosity9283 3 роки тому

      I wanna know why James did not face the same error !?

    • @michaelfelleisen6424
      @michaelfelleisen6424 3 роки тому +2

      @@curiosity9283 He uses the XAML Hotload a lot. I used to always build if I wanted to see the changes, and the hotload stuff does some serious magic :) He gets the same error at a later point when he builds the app!

  • @behi667
    @behi667 3 роки тому +9

    I was waiting for the moment when code suddenly starts appearing or disappearing between episodes and when pasting instead of typing the code begins, just to make it super easy to follow for us noobs and here we are. I am not disappointed. Thanks!

    • @JamesMontemagno
      @JamesMontemagno  3 роки тому +3

      Take a look a look at the GitHub repo - readme - github.com/jamesmontemagno/MyCoffeeApp it has branches for every single video so you can stay up to date.

    • @behi667
      @behi667 3 роки тому +3

      @@JamesMontemagno that's not the point mate. I can copy paste stuff from your GitHub or stack overflow all my life if I want, but that doesn't make for a good tutorial

    • @JamesMontemagno
      @JamesMontemagno  3 роки тому +3

      Yeah, I hear you, I try not to make many changes at all between videos. I do have the branches to show the commits I am making along with each video. In this case I didn't want to populate all of the coffee/groups there as that isn't really beneficial. Appreciate the feedback though.

  • @MuhammadSibtainArain
    @MuhammadSibtainArain Рік тому

    No Words Man Specially the way you deliver is awesome. I am really thankful for all what you are doing

  • @abdulazizalzayed2979
    @abdulazizalzayed2979 3 роки тому +35

    you are an amazing presenter, and I'm wondering why this series does not have millions of views!

    • @efexzium
      @efexzium 2 роки тому +2

      Because very few people use Xamarin

    • @efexzium
      @efexzium 2 роки тому +1

      Its a great technology just as good or better than native, but people are simply to
      Invested in native. Again Microsoft was to late.Maybe if we keep improving it more people will come.

    • @efexzium
      @efexzium 2 роки тому +1

      What do you guys think
      ?

  • @josephlx1325
    @josephlx1325 2 роки тому +2

    This is one of the best tutorials i've seen about xamarin, thanks so much!

  • @dalton-lima
    @dalton-lima 3 роки тому +2

    I start to learn Xamarin (coming from a GameDev C# background) and immediately got in love with your content.
    Just bing watch this entire 101 playlist and subbed!
    Thank you so much James!

    • @JamesMontemagno
      @JamesMontemagno  3 роки тому

      Whoa that is awesome! Glad you are enjoying them so much :)

  • @jackagupton
    @jackagupton 3 роки тому +10

    I've really been enjoying this series and have been dutifully following along. Somehow, I got a bit sideways in this video - I'm not sure if I missed it (either in the notes above - or accidentally skipped a video), but there it seemed like there was a jump in code progression between the last video about MVVM Helpers and this one. I will probably need to go back and restart, but I was curious if there was a resource (or resources) that I missed. I'm excited to learn this and hope to role out Xamarin in one of my HS Comp Sci classes - this has been really helpful so far!

  • @issacproton7885
    @issacproton7885 3 роки тому +6

    loved it....Thanks a lot for your endless effort to help countless developers to build beautiful applications!

  • @typhoonf6
    @typhoonf6 3 роки тому +1

    Coming from WPF and wanting to learn some Xamarin for fun... this series is killer. I didn't realise the XAML was basically the same. Having used listviews before too, even though it seems you just skimmed the surface, I learned a lot!
    Hope this channel blows up... it deserves it.

  • @wonlee3547
    @wonlee3547 3 роки тому

    Thank you so much James. I was truggling with xamarin and now I found super duper awesome video tutorial... thank you so much!!!!

  • @realcolormusic
    @realcolormusic 3 роки тому

    And I want to thank you for the ObservableRangeCollection. It is really cool.

  • @belmiris1371
    @belmiris1371 3 роки тому +1

    That was a very amazing ListView presentation. Perhaps, indeed, the MOST amazing =). Thanks!

  • @SwalahAmani
    @SwalahAmani 2 роки тому

    Thanks!

  • @vulcan20
    @vulcan20 2 роки тому

    I came here because I did not know how to declare the datatype of the data template and I had been stuck for about a week. However, I ended up watching the whole video, it was amazing.

  • @mahkhaikeat1726
    @mahkhaikeat1726 2 роки тому

    Thanks a lot your video is helpful especially for a new Xamarin Developers to build application

  • @edsonsaito2171
    @edsonsaito2171 2 роки тому +1

    Awesome! Super didactic ! U definitely rock James! Tonx!🤜🤛

  • @mathowlett
    @mathowlett 2 роки тому

    Your hair looks really lovely in this video James :)

  • @realcolormusic
    @realcolormusic 3 роки тому

    One of the best Tutorials I've ever seen! :-)

  • @PC-js3bj
    @PC-js3bj 3 роки тому

    Thanks James!

  • @JasonPurkiss
    @JasonPurkiss 3 роки тому +2

    thanks for the revision, love it thanks

  • @stephanraab3648
    @stephanraab3648 3 роки тому +1

    Good initial overview for sure!

  • @CharwinAmper
    @CharwinAmper 3 роки тому

    I am learning again!! thank you!!

  • @Gollumfili
    @Gollumfili 2 роки тому +2

    For some reason the images won't display. I'm pulling the images from a local directory rather than from a URI. Is there something I should be doing differently? The placeholder is there where the image is meant to be, but it is just whitespace currently.

  • @maheshkumbhar4216
    @maheshkumbhar4216 3 роки тому

    Thanks James,
    Got to understand how ListView Work.

  • @ikotin123
    @ikotin123 3 роки тому +2

    Nice vid!! Will you be doing similar ones on other controls and Xamarin.Forms stuff? Would like to see one on Shell!

    • @JamesMontemagno
      @JamesMontemagno  3 роки тому +1

      That's the plan! My intro video has a Shell overview, but doing more soon! :)

  • @jhdabomb
    @jhdabomb 3 роки тому

    Love your videos! Thank you for all that you are doing. You're Amazing!

  • @jimmyjenata
    @jimmyjenata Рік тому

    thanks in advance for the video tutorial about listview
    can you give an example how to do update on listview item eg by number on stepper

  • @rushas
    @rushas 2 роки тому

    Great video, though I couldn't find what I was looking for: scrolling to a particular list item programmatically. Any suggestions?

  • @AlexK-xn7tq
    @AlexK-xn7tq 3 роки тому

    Cool! Thank you soooo much for such an interesting tutorial!

  • @erikwettergren
    @erikwettergren 3 роки тому +3

    As always great tutorial from you James! However, this time it took some detective work to figure out some of the behind the scenes work :-) Think I got most of it figured out though but one odd thing remains. When binding to "Name" and "Roaster" (in my case "Topic" and "Description") i get an error message saying "Member not found in data context". It still pulls out the data from my viewmodel and displays it in the Emulator - But If I later restart the app I get build errors "Binding: Property not found on..."
    Any idea on what I've missed?

    • @erikwettergren
      @erikwettergren 3 роки тому +1

      Ok I figured it out - adding x:DataType to the data template did the trick (as you did at 12:30) but how come you got so far without getting this error?

    • @erikwettergren
      @erikwettergren 3 роки тому

      But then again, ran into the exact same issue with binding to "Key" for Gropings - now this time adding x:DataType doesn't seem to help - I guess I have a lot more to learn about this...

    • @JamesMontemagno
      @JamesMontemagno  3 роки тому

      So, if you are in xaml hot reload mode it doesn’t apply because it is not compiling code. For your groupings checkout my repo as you can use the null option to clear it out docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/data-binding/compiled-bindings#combine-compiled-bindings-with-classic-bindings

    • @russellschutte5970
      @russellschutte5970 3 роки тому

      Erik, I had the exact same issue. Extra disappointing that I didn't see your post until I had pulled James' code and scanned it rigorously - and sure enough, found it in his later code, but definitely not in the video. Even restarted Visual Studio - which I thought would have killed anything Hot Reload related.

    • @russellschutte5970
      @russellschutte5970 3 роки тому

      Disabling "Hot Reload" ( Tools > Options > Debugging > Uncheck "Android and iOS (Xamarin.Forms)" under the "Enable XAML Hot Reload" area ) did NOT resolve the issue. (I am running within a VM so I can't run emulators; deploying to Android phone, in case that helps.)

  • @japibirra22
    @japibirra22 3 роки тому

    Just awesome! Thanks for the great explanation!

  • @chester0bennington
    @chester0bennington 3 роки тому

    Thank you so much for such a great explanation!

  • @dyshin123
    @dyshin123 2 роки тому

    Hey James, does WPF support the listview control like this one? I’d really appreciate if that works, i may switch my next project’s architecture.

  • @zhh174
    @zhh174 3 роки тому

    this was freaking awesome

  • @GerardoFerrari
    @GerardoFerrari 2 роки тому

    Great video, I am looking a way to display the rownumber "1.. 2.. 3" on each row without adding a new field to the model "int rowNumber {get;set;}", is it possible? thanks

  • @mikes3122
    @mikes3122 2 роки тому

    Hi James, i've been following this along from the start but for some reason at 7:48 i can't get the binding to bind to the item so is just blank with no text and also when you set the item source to coffee for some reason also blank. any ideas why ?

    • @kuzco7061
      @kuzco7061 2 роки тому

      This was happening with me too! I copied the code from GitHub and deleted all that he hadn't coded yet at that point. It worked :)

    • @mikes3122
      @mikes3122 2 роки тому

      @@kuzco7061 yeah I did the same strange why It wouldn't work at the time, getting a similar issue now were my observable collection populates fine but doesn't display on the page for some reason

  • @kuzco7061
    @kuzco7061 2 роки тому +1

    Someone else having a problem with rendering the image?
    I have an old Fire Tablet on which I'm testing the apps but the image doesn't render. On the emulator I get the rendering...
    Any tips on how to solve this?
    Awesome tutorial btw

  • @alancamey4666
    @alancamey4666 3 роки тому

    Hi good video , it help me so much, i have a question , the things is , how i change the color bar when tapped an item listview i want change the background color black to another example green light , thank you for your answer.

    • @JamesMontemagno
      @JamesMontemagno  3 роки тому

      Take a look here stackoverflow.com/questions/25885238/xamarin-forms-listview-set-the-highlight-color-of-a-tapped-item

  • @annbrady2310
    @annbrady2310 3 роки тому

    Thanks for this video. One question I have is how do you create groups dynamically rather than creating each group hardcoded in the viewmodel?

    • @JamesMontemagno
      @JamesMontemagno  3 роки тому

      For sure! Take a look here github.com/jamesmontemagno/app-ac-islandtracker/blob/master/TurnipTracker/ViewModel/FriendsViewModel.cs#L327

  • @samtech7124
    @samtech7124 2 роки тому

    hi James
    Awesome Video Thanks a lot.
    Please help us on below issue:
    we are facing an issue with hiding/showing elements inside the listview.
    size of viewcell becomes bigger when we show some elements which were initially visible as false

  • @khalifehamin
    @khalifehamin 3 роки тому

    You're Amazing!

  • @SaveTheHedgehog
    @SaveTheHedgehog Рік тому

    Where does the orange background color came from?

  • @georgekopadze791
    @georgekopadze791 3 роки тому

    Great video, as always. Well done James and Thank you. Quick question: do u use consolas as default font? :)

    • @JamesMontemagno
      @JamesMontemagno  3 роки тому

      Thanks! I believe I have consolas as the default, which I think is the default... ? I sometimes switch to Lucida Console, which is a nice font.

  • @tahirkhan466
    @tahirkhan466 2 роки тому

    Please tell me if i have list view along with some other grid data which is long enough do i need to put all inside scrollview ? because when i do that there is empty space inside listview after my listview items

  • @Donaldbeebi
    @Donaldbeebi 3 роки тому +1

    Would have been nice if at the beginning you showed us more clearly what changes you have made since the last video. I couldn't follow your source code. And my compiler is giving my errors on "Coffee.Take(2)"

    • @JamesMontemagno
      @JamesMontemagno  3 роки тому +2

      Take a look a look at the GitHub repo - readme - github.com/jamesmontemagno/MyCoffeeApp it has branches for every single video so you can stay up to date.

    • @russellschutte5970
      @russellschutte5970 3 роки тому +1

      Take(2) requires "using System.Linq;" at the top of the file. If you created your own Model class, make sure it inherits from ViewModelBase or BaseViewModel depending on how you decided to handle that from the prior videos.

    • @renaudgg
      @renaudgg 2 роки тому

      Mister Dee, i have the exact same concert right now. Im not sure what James means by going to ReadMe? it shows a list of youtube videos whicha re exactly those here...i dont udnerstand how to see what happened between video 7 and 8. what did you do to clear this out ?

  • @kevinmungame1869
    @kevinmungame1869 3 роки тому

    Where did you get that name? Kenya Kiambu ...watching from Kiambu

  • @uzziautomatic3416
    @uzziautomatic3416 3 роки тому

    Amazing!!

  • @dotnetdevni
    @dotnetdevni 2 роки тому

    100% IN UR code behind comment sometimes it just makes life easier doing something simple code behind

  • @shahanahmed9444
    @shahanahmed9444 2 роки тому

    When i try to deselect i get this error - 'Object reference not set to an instance of an object' - any ideas?

  • @BlyZeHD
    @BlyZeHD 2 роки тому +1

    where is the IsBusy coming from?

    • @JamesMontemagno
      @JamesMontemagno  2 роки тому

      IsBusy comes from my base view model. Checkout ua-cam.com/video/y8ZqEOLDeo8/v-deo.html

  • @johnrockets3719
    @johnrockets3719 3 роки тому

    How can you do a add more or remove product shopping cart with the list view ?

    • @JamesMontemagno
      @JamesMontemagno  3 роки тому

      You can add and remove items from the observable collection like I show

  • @mdottech6502
    @mdottech6502 2 роки тому

    Hi , Can You please help me why i am getting an error line below when adding coffee means coffee.Add is not working

    • @mdottech6502
      @mdottech6502 2 роки тому

      I am doing this code in .net Maui Project

    • @JamesMontemagno
      @JamesMontemagno  2 роки тому

      hmmmmm if you can post a Q here docs.microsoft.com/en-us/answers/topics/dotnet-maui.html

  • @riveracleo
    @riveracleo Рік тому

    Hi, hope anyone can help. I have this error with ViewCellRenderer where I have to use "using ViewCellRenderer = Microsoft.Maui.Controls.Handlers.Compatibility.ViewCellRenderer;" for my namespace. It says that Compatibility does not exist in Microsoft.Maui.Controls.Handlers. How can I migrate this block of code to .net maui without error?

  • @najeebvannp
    @najeebvannp 3 роки тому

    Is there any way to select multiple items in Listview as in CollectionView

    • @JamesMontemagno
      @JamesMontemagno  3 роки тому +1

      Not without manual work to have an IsSelected in your item that could be toggled when tapped and doing something special in the view based on this.

  • @A_Yuppie
    @A_Yuppie Рік тому

    Best man in the fucking earth

  • @grogirh
    @grogirh 3 роки тому

    Hey!! I have a little problem and don't know how to fix it. When I add some features like the groupDisplayBinding, the text color is white so I can´t see it on the app without changing the background color. Is it possible to change that color text?? This happen to me also with other elements, but I've been able to fix it setting the color manually with a textColor property
    Thanks so much for listening!!

    • @grogirh
      @grogirh 3 роки тому

      I'm using the sdk for android 10 and debugging on my own android phone

    • @JamesMontemagno
      @JamesMontemagno  3 роки тому +1

      You want to check my post on app themes to enable dark mode for your app

    • @grogirh
      @grogirh 3 роки тому

      @@JamesMontemagno Omg thank you!!! You're totally right
      Thanks for this tutorials and all your work!!

  • @ShoniNemavhidi
    @ShoniNemavhidi 3 роки тому

    Legend

  • @pasinduosadha310
    @pasinduosadha310 3 роки тому

    thanks

  • @mikegrainger8082
    @mikegrainger8082 3 роки тому

    Great video. Is this app avail on github?

  • @sopothetocho
    @sopothetocho 3 роки тому +1

    I don't why but ListView does not display anything, my code is the same as yours but in the emulator I don't see any item, the ListView is there because when I change its color to red I can see it, but no Items are displayed.
    Please don't do stuff off camera, it makes the tutorial very hard to follow.
    EDIT: I Fixed it. 🥴🤙

    • @nikolaosefentis4373
      @nikolaosefentis4373 3 роки тому

      hello friend, I have the same issue, how did you solved it? thanks in advance :)

  • @rakeshravig
    @rakeshravig 3 роки тому +1

    Can you plz include infinite list for the next video.

  • @BK-lx5mo
    @BK-lx5mo 3 роки тому +4

    VS is throwing an error on {Binding Name} : " Member (Name) not found in data context 'CoffeeEquipmentViewModel' class MyCoffeeApp.ViewModels.CoffeeEquipmentViewModel Location: CoffeeEquipmentViewModel.cs " . The only way I can get it to work is by changing it to {Binding .} , running, then changing back to {Binding Name} via Hot Reload. Any ideas? When I created Coffee.cs, it automatically created it in the ViewModels directory - I had to create a Models directory and move Coffee.cs there. Otherwise, I've followed every step of your instructions. Thx

    • @BK-lx5mo
      @BK-lx5mo 3 роки тому +3

      Aha! Found the fix on StackOverflow: you must remove the x:DataType entry from the ContentPage parameters (in CoffeeEquipmentPage.xaml). We're already defining a BindingContext for the ViewModel. Hopefully this will help someone else.

    • @dennyg697
      @dennyg697 3 роки тому

      @@BK-lx5mo Have a like for this, you saved my night!

  • @dotnetdevni
    @dotnetdevni 2 роки тому +1

    Does james re do his videos when he changes his hair style lol

  • @tejaswikumarpane4914
    @tejaswikumarpane4914 2 роки тому

    Master details page search handler in detail page search how to design the ui

  • @robertcolvin5162
    @robertcolvin5162 3 роки тому

    Is anyone else bothered by the smudge or whatever on the wall behind him? I keep thinking I have a smudge on my screen...

    • @JamesMontemagno
      @JamesMontemagno  3 роки тому

      Bottom left? Center artwork -> instagram.com/p/BceZ1oNHiQx/ ?

    • @robertcolvin5162
      @robertcolvin5162 3 роки тому

      @@JamesMontemagno Bottom left, yes haha. Is that a door stopper? I've been trying to figure it out while I follow this awesome series.

    • @JamesMontemagno
      @JamesMontemagno  3 роки тому

      @@robertcolvin5162 It totally is! lol, we used to have really big bumpers in there, but replaced them with these amzn.to/37WADZh that is funny

  • @EliezerZola2023
    @EliezerZola2023 Рік тому

    Thanks James!