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

Поделиться
HTML-код
  • Опубликовано: 16 май 2024
  • [ Skill Level : Intermediate ]
    A WPF - MVVM Based Modern / Contemporary Dashboard UI Design with Text Search Filter.
    Subscription Link for more WPF videos and updates :
    ruclips.net/user/cdesignproarunmut...
    Download the Complete Source Code from Github Repository.
    Link : github.com/CSharpDesignPro/WP...
    // Chapters //
    00:00 Intro
    07:00 Predefined Style Template
    07:28 Model
    12:10 RelayCommand
    16:32 ViewModel
    17:20 CollectionViewSource
    18:00 ICollectionView
    18:52 ObservableCollection
    23:02 INotifyPropertyChanged Interface Member
    23:45 Text Search Filter
    31:05 ItemsControl
    33:25 View
    38:23 DataTemplates
    43:10 Switch Views
    45:50 ICommand
    47:27 Close App
    49:28 Command Parameter
    50:15 Page Container
    51:15 Close Button
    Subscription Link for more WPF videos and updates :
    ruclips.net/user/cdesignproarunmut...
    Related Videos
    WPF - Navigation Menu With Sub Menu : • WPF - Navigation Menu ...
    WPF - Navigation Drawer / Sidebar Menu : • WPF - Navigation Drawe...
    WPF - Hamburger Menu / SubMenu : • WPF - Hamburger Menu /...
    Channel Link: / cdesignpro_arunmutharasu
    Tools Used :
    Microsoft Visual Studio Community Edition 2019
    Icon Credits :
    icons8.com/icons
    Thank you!
    Have a great day!
    For Business Inquiries : arun.enterprises.co@gmail.com

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

  • @Rick-tg4oy
    @Rick-tg4oy 2 года назад +4

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

  • @user-fh3nw9rw9b
    @user-fh3nw9rw9b 2 года назад +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 2 года назад +1

    Man I love your work, Keep going...

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

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

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

    Great videos! Would like to see more MVVM please.

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

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

  • @vuphong6036
    @vuphong6036 4 месяца назад +1

    So wonderfull! Thanks. From VN with love

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

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

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

    That's was awesome, Thank a lot🤗

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

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

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

    Incredible video! Good job thank you

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

      @Chloe - Thank you!

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

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

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

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

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

    very impressiv! keep going on

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

    Thanks for upload Great Video!

  • @user-jl9we2dn4w
    @user-jl9we2dn4w 2 года назад +4

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

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

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

  • @k-r6465
    @k-r6465 Год назад +1

    i love WPF

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

    you are very good innovative Designer.

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

    Good video👍

  • @codingjogo
    @codingjogo 4 месяца назад +1

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

  • @angelldark6426
    @angelldark6426 11 месяцев назад +1

    Thanks for the animations

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

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

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

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

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

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

  • @user-fh3nw9rw9b
    @user-fh3nw9rw9b 2 года назад +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  2 года назад +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.

  • @mrmr-jiro607
    @mrmr-jiro607 2 года назад +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  2 года назад +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 2 года назад

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

  • @user-wn5pl1zo5d
    @user-wn5pl1zo5d 2 года назад +1

    very 👍

  • @azeeza2197
    @azeeza2197 2 года назад +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  2 года назад

      @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 2 года назад +1

      @@CSharpDesignPro Yes, thanks for your reply !

  • @Deepakkumar-ry8kv
    @Deepakkumar-ry8kv 11 месяцев назад +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  10 месяцев назад

      @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!

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

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

  • @r33cksanchez58
    @r33cksanchez58 2 года назад +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  2 года назад +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 2 года назад +1

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

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

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

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

      @R33ck Sanchez - Glad it was helpful!

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

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

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

      @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 2 года назад +1

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

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

      ​@@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;
      }
      }​

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

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

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

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

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

      @@CSharpDesignPro thank a lot.

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

      @@CSharpDesignPro so impressive

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

      @Mai Vayne - Thank you!

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

    Can you upload the source code on github please ?

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

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

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

      @@CSharpDesignPro I found it, thanks 😊