Exemplo n.º 1
0
        public static void OnItemsSourcePropertyChanged(object sender, DependencyPropertyChangedEventArgs args)
        {
            MenuFlyoutItemsSetter source = (MenuFlyoutItemsSetter)sender;

            if (args.OldValue is System.Collections.Specialized.INotifyCollectionChanged oldNotifyCollectionChanged)
            {
                oldNotifyCollectionChanged.CollectionChanged -= source.OldNotifyCollectionChanged_CollectionChanged;
            }

            if (args.NewValue is System.Collections.Specialized.INotifyCollectionChanged newNotifyCollectionChanged)
            {
                newNotifyCollectionChanged.CollectionChanged += source.OldNotifyCollectionChanged_CollectionChanged;
            }

            source.IsRequireReset = true;
        }
Exemplo n.º 2
0
        public static void OnMenuFlyoutItemsSetterPropertyChanged(object sender, DependencyPropertyChangedEventArgs args)
        {
            MenuFlyoutItemsSetter source = (MenuFlyoutItemsSetter)sender;

            source.IsRequireReset = true;
        }