From 48067f87c2e03b838b41e3ff3008d78ecf37290d Mon Sep 17 00:00:00 2001 From: batzen Date: Wed, 30 Sep 2015 23:34:00 +0200 Subject: [PATCH] Fixes #173 by refreshing GalleryPanel when items are changed --- Fluent/Controls/GalleryPanel.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Fluent/Controls/GalleryPanel.cs b/Fluent/Controls/GalleryPanel.cs index 6e2ca5ff2..b322edf4b 100644 --- a/Fluent/Controls/GalleryPanel.cs +++ b/Fluent/Controls/GalleryPanel.cs @@ -7,6 +7,7 @@ using System.Reflection; using System.Windows; using System.Windows.Controls; + using System.Windows.Controls.Primitives; using System.Windows.Data; using System.Windows.Media; using System.Windows.Threading; @@ -607,5 +608,12 @@ protected override IEnumerator LogicalChildren } } } + + protected override void OnItemsChanged(object sender, ItemsChangedEventArgs args) + { + base.OnItemsChanged(sender, args); + + this.Dispatcher.BeginInvoke(DispatcherPriority.Background, (Action)(this.Refresh)); + } } } \ No newline at end of file