WPF - Dashboard | MVVM | UI Design | XAML | C# | Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ม.ค. 2025

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

  • @Rick-tg4oy
    @Rick-tg4oy 3 ปีที่แล้ว +6

    I watched one of your videos yesterday and thought..dang I wish he showed an MVVM version.
    And here we are.

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

    So wonderfull! Thanks. From VN with love

    • @CSharpDesignPro
      @CSharpDesignPro  11 หลายเดือนก่อน

      @vuphong6036 - Thank you for your kind words! I'm delighted to know that you found the content both valuable and useful.

  • @FRO2010fuz
    @FRO2010fuz 2 ปีที่แล้ว +1

    You´re a realy dev ninja...Congrats!!

  • @오창석-m4x
    @오창석-m4x 3 ปีที่แล้ว +2

    I wanted to make a program with wpf using mvvm pattern without using Code Behind as much as possible, but I'm really grateful that the video I wanted came out.
    I'll take that into consideration and learn well.

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

    Man I love your work, Keep going...

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

      @Nematullah Hussaini - Sure. Thanks!

  • @MrBadhurudeen
    @MrBadhurudeen 2 ปีที่แล้ว +1

    you are very good innovative Designer.

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

    very impressiv! keep going on

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

    uff......one year later ......still great ....I love it.

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

      @PicharDev - I really appreciate your kind words. Thanks!

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

    Great videos! Would like to see more MVVM please.

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

      @GuildOfCalamity - I'm glad! Thanks for the appreciation:) Sure, I'll try to make more videos on MVVM.

  • @HON.SE.PTEMBER
    @HON.SE.PTEMBER 2 ปีที่แล้ว +1

    Incredible video! Good job thank you

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

      @Chloe - Thank you!

    • @HON.SE.PTEMBER
      @HON.SE.PTEMBER 2 ปีที่แล้ว +1

      @@CSharpDesignPro keep it up! The subs will come I am sure!!! Merry Christmas

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

      @Chloe - I really do appreciate your kind words! Thanks a lot! Merry Christmas!!!

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

    That's was awesome, Thank a lot🤗

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

      @morteza jafari - You're welcome:) Glad you liked it!

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

    Good video👍

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

    where can I learn your MVVM, and WPF?
    can you show me the path to build like him?
    anyone?

  • @seemovielove3597
    @seemovielove3597 2 ปีที่แล้ว +1

    Thanks. I would love to see how to handle displaying real-time data using MVVM.

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

    Thanks for upload Great Video!

  • @AliMustafa-xp8ih
    @AliMustafa-xp8ih 6 หลายเดือนก่อน +1

    Greate video, thank you

    • @CSharpDesignPro
      @CSharpDesignPro  5 หลายเดือนก่อน

      @AliMustafa-xp8ih - Glad it helped. Thanks!

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

    Thanks for the animations

  • @k-r6465
    @k-r6465 2 ปีที่แล้ว +1

    i love WPF

  • @mrmr-jiro607
    @mrmr-jiro607 3 ปีที่แล้ว +1

    Great Video, Thank you!
    i would like to show no item found when the user types a menu that isn't available..

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

      @dxdiag Mr-jiro - Thanks!
      // To Display "No Record Found" using a label //
      1. Declare a BooleanToVisibilityConverter in Windows Resources.
      2. Add a Label to the Menu Grid.
      3. Create a bool "ShowLabel" method and set it to false in NavigationViewModel.
      4. Bind "ShowLabel" to the "Visibility" property of the Label along with the Converter in the Menu Grid.
      5. Add an If Else statement to the MenuItems_Filter method.
      if (MenuItemsCollection.View.IsEmpty)
      {
      // Show label if CollectionView is Empty
      ShowLabel = true;
      }
      else
      {
      // Hide label if CollectionView is not Empty
      ShowLabel = false;
      }
      I hope this helps.

    • @mrmr-jiro607
      @mrmr-jiro607 3 ปีที่แล้ว

      @@CSharpDesignPro Thanks for the quick reply! i'll try it and get back.

  • @ПавелКуликов-в2л
    @ПавелКуликов-в2л 3 ปีที่แล้ว +4

    Спасибо за урок!!!!!

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

      @Павел Куликов - Glad to be of help!

  • @Deepakkumar-ry8kv
    @Deepakkumar-ry8kv ปีที่แล้ว +1

    Great video. I am practicing to build app by imitating your video. In one of the views I created usercontrol with a form, with textboxes and autocomplete box. After clicking of submit butto, the data saved to the database but the content on the view usercontrol is not refreshing. It is showing the data as it is it was filled. If I clear the textbox, the autocomplete box, which should be updated with the latest data is not updating. Else after submittjng and then switching the views from menu option works. Kindly help how I can submit the data and refreshes the ui with updated data

    • @CSharpDesignPro
      @CSharpDesignPro  ปีที่แล้ว

      @Deepakkumar-ry8kv - I'm happy to hear that the video helped you out! It seems like you're experiencing an issue with refreshing the UI after submitting data. Make sure your data bindings are correctly set up and consider implementing a refresh method or manually updating the UI controls after data submission. I hope this helps. Thanks!

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

    I have trouble to understand the need of call OnPropertyChanged() in the FilterText setter. I removed it and the filter still working. The UpdateSourceTrigger of the TextBox doesn't make a double call ?

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

      @aze eza - Hi, Here in this case, you need to call the OnPropertyChanged whenever the property is updated or the source has been changed dynamically. You should check if the value is actually changed before firing the OnPropertyChanged event. The textbox is checking for the change, and thereby avoiding an infinite cycle of binding updates. To know more about OnPropertyChanged, check the following links :
      ( One Way and Two Way Binding )
      docs.microsoft.com/en-us/dotnet/desktop/wpf/data/how-to-implement-property-change-notification?view=netframeworkdesktop-4.8
      ( Filtering Data )
      docs.microsoft.com/en-us/dotnet/desktop/wpf/controls/how-to-group-sort-and-filter-data-in-the-datagrid-control?view=netframeworkdesktop-4.8
      I hope this helps.

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

      @@CSharpDesignPro Yes, thanks for your reply !

  • @오창석-m4x
    @오창석-m4x 3 ปีที่แล้ว +2

    Hello
    I'm studying after seeing a good code with this MVVM applied well.
    Can you tell me how to create and show a new window when you click the button by applying MVVM to this code?
    No matter how hard I try, it doesn't work, so I'm asking
    Thank you.

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

      @오창석 - Hi, I'm glad the tutorial was helpful! Can you post the code that you have tried so far? It would be easier for me to provide a better solution.

  • @timk8983
    @timk8983 3 หลายเดือนก่อน +1

    Great Job!!! Enjoyed it very much.
    Are you working as a freelancer and can help me at a project?

    • @CSharpDesignPro
      @CSharpDesignPro  2 หลายเดือนก่อน

      @timk8983 - Thank you! For business inquiries, please feel free to email me at - arun.enterprises.co@gmail.com

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

    Great video! But I have one trouble, I need left menu horizontal, not vertical, I tried so much to find in, but my head is blown away;D
    Please help!

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

      @R33ck Sanchez - Try to replace the 'Menu' code in the MainWindow with the following code.





      // Comment Out the 'Page Container' code to test the horizontal left menu code. //

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

      @@CSharpDesignPro thank you very much! I’ll try it later

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

      @@CSharpDesignPro It's working! thank you very much!

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

      @R33ck Sanchez - Glad it was helpful!

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

    Бля, где же ты был все это время????

  • @김영수-r3b7e
    @김영수-r3b7e 2 ปีที่แล้ว +1

    very 👍

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

    I can't see the source code please help me.

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

      @Mai Vayne - Hi, Check the link again. You should be able to find it now.

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

      @@CSharpDesignPro thank a lot.

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

      @@CSharpDesignPro so impressive

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

      @Mai Vayne - Thank you!

  • @amryakout2957
    @amryakout2957 2 ปีที่แล้ว +1

    Can you upload the source code on github please ?

    • @CSharpDesignPro
      @CSharpDesignPro  2 ปีที่แล้ว +1

      @Amr Yakout - You can find the link in the description!

    • @amryakout2957
      @amryakout2957 2 ปีที่แล้ว +1

      @@CSharpDesignPro I found it, thanks 😊

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

    Вот тебе задачка, над которой сейчас бьюсь я, если поможешь, буду очень признателен, как сделать фильтрацию, которую ты реализовал, только для древовидной структуры?

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

      @Zero Indefined - TreeView filtering could be achieved with a slight modification, try to create an ItemsCollection with a filter that includes all the nodes in the hierarchy [HierarchicalDataTemplate] while using the same delegate, and then update the filter. I hope that helps.

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

      @@CSharpDesignProСпасибо большое, обязательно попробую, отпишусь о результатах😁

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

      ​@@CSharpDesignPro, вопрос: То есть мне придется перестроить архитектуру, так как я не наследовался от узлов дерева, чтобы было проще:
      public class MenuItem
      {
      private List _Childs = new List();
      private PackIconBootstrapIconsKind _Kind = PackIconBootstrapIconsKind.Info;
      public MenuItem()
      {

      }
      ///
      /// Картинки
      ///
      public PackIconBootstrapIconsKind Kind
      {
      get { return _Kind; }
      set
      {
      _Kind = value;
      }
      }
      ///
      /// Имя блока или позиции
      ///
      public string Name { get; set; }
      ///
      /// В отдельном ли окне?
      ///
      [DefaultValue(false)]
      public bool IsExpanded { get; set; }
      [DefaultValue(false)]
      public bool IsDeployed { get; set; }
      public bool IsDeployedable => Childs.Count != 0;
      ///
      /// Дочерние элементы
      ///
      public List Childs
      {
      get { return _Childs; }
      set
      {
      _Childs = value;
      }
      }
      }
      public class MenuCollection : INotifyPropertyChanged
      {
      private CollectionViewSource _MenuItemsCollection;
      public ICollectionView MenuItemsSourceCollection => _MenuItemsCollection.View;
      public MenuCollection()
      {
      ObservableCollection Items = new ObservableCollection();
      #region Настройки
      MenuItem SettingsItem = new MenuItem() { Name = "Настройки",Kind = PackIconBootstrapIconsKind.Gear };
      MenuItem MainSettingsItem = new MenuItem() { Name = "Основные", Kind = PackIconBootstrapIconsKind.BookmarkCheck };
      MenuItem GraphicsItem = new MenuItem() { Name = "Оформление", Kind = PackIconBootstrapIconsKind.Palette };
      SettingsItem.Childs.Add(MainSettingsItem);
      SettingsItem.Childs.Add(GraphicsItem);
      #endregion
      Items.Add(SettingsItem);
      _MenuItemsCollection = new CollectionViewSource() {Source = Items };
      _MenuItemsCollection.Filter += _MenuItemsCollection_Filter;
      }
      protected void OnPropertyChanged([CallerMemberName] string propertyName = null) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
      public event PropertyChangedEventHandler PropertyChanged;
      private string _Filter;
      public string Filter
      {
      get { return _Filter; }
      set
      {
      _Filter = value;
      _MenuItemsCollection.View.Refresh();
      OnPropertyChanged("Filter");
      }
      }

      private void _MenuItemsCollection_Filter(object sender, FilterEventArgs e)
      {
      if (string.IsNullOrEmpty(Filter))
      {
      e.Accepted = true;
      return;
      }
      MenuItem MenuItem = e.Item as MenuItem;
      e.Accepted = FindInMenuItem(MenuItem, Filter, e);
      }
      private bool FindInMenuItem(MenuItem menuItem, string filter, FilterEventArgs e)
      {
      if (menuItem.Childs.Count == 0)
      {
      if (menuItem.Name.ToUpper().Contains(filter.ToUpper()))
      {
      e.Accepted = true;
      }
      else
      {
      e.Accepted = false;
      }
      }
      else
      {
      bool Privileged = false;
      foreach (MenuItem item in menuItem.Childs)
      {
      bool Result = FindInMenuItem(item, Filter, e);
      if ((Privileged == false)&&(Result == true))
      {
      Privileged = Result;
      }
      }
      e.Accepted = Privileged;
      }
      return e.Accepted;
      }
      }​