Value Converters in WPF

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

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

  • @sachithsampathpriyashantha8195
    @sachithsampathpriyashantha8195 3 года назад +1

    Really Helpful man. Finally found a simplest and easiest one on the internet. ❤️❤️

  • @snekjeks9862
    @snekjeks9862 3 года назад

    Wow. So simple thanks! Spent hours searching for this. Thanks alot!!

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

    You are a superhero.

  • @ritasrivastava6654
    @ritasrivastava6654 3 года назад

    Very simple and easy to understand tutorial on ValueConverter. Really helped me understand the concept. Well done 👍

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

    Thank you, I was struggling to figure out how to convert my Enum values to icons in my datagrid. With the help of this video I managed to write a IconConverter class that takes my enum value and converts it to a StreamGeometry instance. I can then pass this StreamGeometery instance along to my view to be used inside a element as the source for the Data attribute.
    Initially I wanted to use a Dynamic resource binding to bind StreamGeometery to a path but really couldn't figure out how make this work.
    PS: I'm using Avalonia instead of WPF, but it uses the same syntax so I didn't really need to change anything compared to your code :).

  • @rolandwatz7797
    @rolandwatz7797 3 года назад

    This was really helpul for me. Thanks a lot Dude

  • @vinavagrawal6373
    @vinavagrawal6373 4 года назад +4

    Why we used
    DateTime date = (DateTime)value;
    Value is always null. So it will always throw exception

  • @nalinsharma9881
    @nalinsharma9881 7 лет назад

    Thanks it really helped. Lectures are useful for absolute beginners. :)

  • @abhijitv
    @abhijitv 6 лет назад

    VERY GOOD VIDEO!!!!

  • @NikhilKumar-iq6rk
    @NikhilKumar-iq6rk 6 лет назад +1

    very helpful lectures . can u please share code for lectures 20 to 28.

  • @anveshbabuunnam1658
    @anveshbabuunnam1658 5 лет назад

    Thank you, it is helpful, if it is possible can you plese make video, how to hide fields which is available in view by using viewmodel class

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

    When you are adding person to persons list every time. it is creating duplicate item.

  • @quantomic1106
    @quantomic1106 4 года назад +1

    It does not work!. Keep getting System.NullReferenceExeption error on *DateTime date = (DateTime)value;*
    Followed your step to the letter.

    • @dotnetskoool5809
      @dotnetskoool5809  4 года назад

      I will upload my cod in Git Hub soon brother. Give me some time.

    • @quantomic1106
      @quantomic1106 4 года назад

      @@dotnetskoool5809 Thanks for the response. I got the problem resolved by removing *DateTime date = (DateTime)value;* so the *convert* code ended up like this:
      public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
      {
      DateTime date = DateTime.Today;
      return date.ToString("dd/MM/yyyy");
      }

    • @Tamam_Shud
      @Tamam_Shud 4 года назад

      @@quantomic1106 Although that might work, you're not actually converting anything. You're just returning a date, regardless of what the input is.

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

      First line in the convert method should be removed for this to work .