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; }
public static void OnMenuFlyoutItemsSetterPropertyChanged(object sender, DependencyPropertyChangedEventArgs args) { MenuFlyoutItemsSetter source = (MenuFlyoutItemsSetter)sender; source.IsRequireReset = true; }