Crazy Beautiful User Profiles with AvatarView

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ส.ค. 2024
  • When you're dealing with users in your app, it's nice to use an avatar. But if the user didn't set one how do you show those awesome looking initials? The AvatarView inside the Xamarin Community Toolkit helps you out with that. When there is an avatar, load that, and else show those initials, simple as that!
    In this video we will learn what the AvatarView is and how to use it in your Xamarin.Forms app.
    💝 Join this channel to get access to perks:
    th-cam.com/users/GeraldVerslui...
    🛑 Don't forget to subscribe to my channel for more amazing content: th-cam.com/users/GeraldVerslui...
    🐦 Follow me on Twitter: / jfversluis
    🔗 Links
    Sample App Repo: github.com/jfversluis/XCTAvat...
    AvatarView Docs: docs.microsoft.com/xamarin/co...
    Xamarin.CommunityToolkit Repo: aka.ms/xct
    Xamarin.CommunityToolkit Docs: aka.ms/xct-docs
    ⏱ Timestamps
    0:00 Intro
    0:18 Install the Xamarin.CommunityToolkit NuGet Package
    2:10 Implement AvatarView UI
    2:50 Implement Initials View
    5:55 Implement Loading an Avatar Image
    8:03 Outro
    🎥 Video edited with Camtasia (ref): techsmith.z6rjha.net/AJoeD
    🙋‍♂️ Also find my...
    Twitter: / jfversluis
    Blog: blog.verslu.is
    Twitch: / jfversluis
    All the rest: jfversluis.dev
    #XamarinForms #XamarinCommunityToolkit #AvatarView #Xamarin #XCT
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 47

  • @AlmirVuk
    @AlmirVuk 3 ปีที่แล้ว +3

    Nice video! Also, not 100% sure but I think the best feature of AvatarView is that if you write "Almir Vuk" it will generate the "AV" avatar, it can recognize multiple words.

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว +1

      Are you kidding?! Haha I didn’t even know that! 😄 that’s awesome!

    • @AlmirVuk
      @AlmirVuk 3 ปีที่แล้ว

      @@jfversluis hahaha I think it can, can you try it on the existing sample? :)

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว +1

      Looking at the code here it seems you can: github.com/xamarin/XamarinCommunityToolkit/blob/main/samples/XCT.Sample/ViewModels/Views/AvatarViewViewModel.cs

  • @philippedoumet6073
    @philippedoumet6073 3 ปีที่แล้ว

    Thanks Gerald for the content you are giving us!

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว +1

      Well thank you for being such a fan!

  • @wallacereis26
    @wallacereis26 3 ปีที่แล้ว

    This is fantastic!!! Applying now in my APP !!! Thanks Gerald!!!

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว +1

      Great Wallace! Let me know if you need anything! And if you can share your final design... I’ll be happy to take a look!

  • @robertbrown7478
    @robertbrown7478 3 ปีที่แล้ว

    This is great! Thanks Gerald!!!

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      Woohoo thank you Robert! Planning on using this?

    • @robertbrown7478
      @robertbrown7478 3 ปีที่แล้ว +1

      @@jfversluis yes, I'm working on a little side project and I can totally use this for my friends list page.

  • @spidersoft2771
    @spidersoft2771 3 ปีที่แล้ว +1

    Great job 👍

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว +1

      Thank you! Appreciate it!

  • @madraven37
    @madraven37 3 ปีที่แล้ว

    another useful one..thanks...

  • @alexanderm8169
    @alexanderm8169 3 ปีที่แล้ว +1

    Gerald super great content! Love you video structure!
    Can you show us new developers how to create a horizontal and vertical scrollable view with pinch gesture for zooming in and out? Imagine a user like to inspect a image closer due to bad eye sight

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      Thank you Alexander! For your question: images specifically or anything else?

    • @alexanderm8169
      @alexanderm8169 3 ปีที่แล้ว +1

      @@jfversluis I had images in mind like PNG or JPEG.

  • @aniketsahadeoshinde1218
    @aniketsahadeoshinde1218 2 ปีที่แล้ว

    Border color won't render even if I set it. Is this a know issue.

  • @EdRawrDev5813
    @EdRawrDev5813 3 ปีที่แล้ว

    Great hat

  • @JasonPurkiss
    @JasonPurkiss 3 ปีที่แล้ว

    Hi Gerald another great video thanks, just going to chat for a bit see if you have any advice if you dont mind so updated me visual studio the other day to 16.9.0 and whilst testing noticed that at one point my app like ddoses me server due to it crashing and goes into a loop with a server call within it so whilst confussed on why i had never noticed this before i started to try and fix by removing code and general troubleshooting but couldn't see where the issue was and was more confussed as had similar code elsewhere without issue and so after about 12 hours :( i moved to a different computer where i had not updated visual studio and the issue went which was a relief but now im stuck in limbo lol i could just stay on the old version but feel i should try and find the solution. do you have any thoughts. Im wondering if it might be one of the nuggets currently have no updates for them might try a pre lease of a few nuggets see that helps. thought i would ask you just incase you have experienced same sort of issue :(

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว +1

      If this all started with a Visual Studio update and works on a machine which hasn’t been updated my conclusion based on this: it’s a bug in Visual Studio :)

    • @JasonPurkiss
      @JasonPurkiss 3 ปีที่แล้ว +1

      @@jfversluis great nice one thanks for the quick advice.

    • @JasonPurkiss
      @JasonPurkiss 3 ปีที่แล้ว +1

      You was right thanks, I tried to fix it and couldn't and should have listen to you as i put in many hours to try and fix and didnt till i just read this post so thanks github.com/xamarin/Xamarin.Forms/issues/14069

  • @teymurasadov295
    @teymurasadov295 3 ปีที่แล้ว

    The control itself is cool, but seems it has problems with getting image from uri.
    "Cannot access a closed Stream"
    However, the regular Image control works fine

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว +1

      Sorry to hear that! Please have a look at the repository if there is already an issue for that or open one so we can have a look :)

  • @robertojrcantos1711
    @robertojrcantos1711 3 ปีที่แล้ว

    In Xamarin Community Toolkit version 1.1.0, AvatarView failed to display the image when the source is an imagesource. Please fix it on the next version of XCT.

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      Make sure there is an issue for it on the repo :) I remember seeing something like that, might be fixed already

    • @robertojrcantos1711
      @robertojrcantos1711 3 ปีที่แล้ว

      @@jfversluis I tried to update my current XCT 1.0.3 to 1.1.0 today. I experienced the problem of not displaying image in AvatarView when the source is imagesource type in version 1.1.0. So I tried to return on the previous version 1.0.3 and the image displayed for the imagesource.

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      I mean fixed in code, it’s not released yet

  • @ousspero
    @ousspero 3 ปีที่แล้ว

    Thank you, but a question why they have BorderColor and no border thickness it don't make no sense

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว +1

      Make sure to see if there is an issue for it or open one on the repo so we can see if we can add it :)

    • @ousspero
      @ousspero 3 ปีที่แล้ว

      @@jfversluis ok thank you, i'll check

  • @qwertyyd4049
    @qwertyyd4049 3 ปีที่แล้ว

    Hey Gerald, nice one. How to use Local Image, its not displaying with AvatarView but same is displaying in Xamarin.Forms.Image

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      What does your code look like?

    • @qwertyyd4049
      @qwertyyd4049 3 ปีที่แล้ว

      @@jfversluis Thanks for replying. Here is my code

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      Hm if it works on a regular image please open an issue on the repository so we can have a look

  • @diamandhoxha1699
    @diamandhoxha1699 3 ปีที่แล้ว

    The Nuget package will not install for me, I have tried previous versions and everytime I click install it just doesnt work, know how to solve this?

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      Define "doesn't work". Is there any error message?

    • @diamandhoxha1699
      @diamandhoxha1699 3 ปีที่แล้ว

      @@jfversluis there is no error message, it just goes as if its about to install then doesn't

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      Is there any messages in the console output window? There has to be _something_ :)

    • @diamandhoxha1699
      @diamandhoxha1699 3 ปีที่แล้ว

      @@jfversluis Ye I see it, it only works on Xamarin forms 5 and up, I am on Xamarin forms 4.8 sadly, and when I upgrade this causes issues for some of my other classes

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      Sorry about that!

  • @haveknowledgeindia
    @haveknowledgeindia 3 ปีที่แล้ว

    wow we can design easily

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      That’s the idea! :)