wpfui icon indicating copy to clipboard operation
wpfui copied to clipboard

Fixed menu item add when item added to the ObservableCollection

Open crippledfaith opened this issue 9 months ago • 0 comments

Pull request type

Please check the type of change your PR introduces:

  • [ ] Update
  • [x] Bugfix
  • [ ] Feature
  • [ ] Code style update (formatting, renaming)
  • [ ] Refactoring (no functional changes, no api changes)
  • [ ] Build related changes
  • [ ] Documentation content changes

What is the current behavior?

When MenuItemsSource or FooterMenuItemsSource in MVVM binding to ObservableCollection the Item added to the collection dose not update in the UI.

Issue Number: N/A

What is the new behavior?

        [ObservableProperty]
        private ObservableCollection<object> _broserNavigationViewItem = new ObservableCollection<object>();

         BroserNavigationViewItem.Add(new NavigationViewItem()
         {
             Content = content,
             Icon = new SymbolIcon { Symbol = icon },
             TargetPageType = targetPageType,
             TargetPageTag = name,
             Template = NavigationService.GetNavigationControl().ItemTemplate
         });

NavigationView item will add the Item

Other information

crippledfaith avatar May 18 '24 18:05 crippledfaith