diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-12-08 15:28:31 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-12-08 15:28:31 +0200 |
| commit | d1859415972bb991cba6639482c1cd2a9e19e8d8 (patch) | |
| tree | 93f688cdcf876c23072cf3de016c3811982fbd7e /Software/Visual_Studio/Tango.Touch | |
| parent | 3cd59dd3b04168ad91cb1fe51231e9b3ddd74705 (diff) | |
| download | Tango-d1859415972bb991cba6639482c1cd2a9e19e8d8.tar.gz Tango-d1859415972bb991cba6639482c1cd2a9e19e8d8.zip | |
Implemented possible improvement for WebClient download speed.
Implemented PPC notifications priority.
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch')
| -rw-r--r-- | Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.cs | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.cs index ef7e24ff4..ccd27333a 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.cs +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.cs @@ -165,8 +165,7 @@ namespace Tango.Touch.Controls { element.RegisterForLoadedOrNow((x, y) => { - CurrentMinHeight = element.ActualHeight; - ResizeNotification(element); + CurrentMinHeight = element.FindChild<UserControl>().MinHeight; }); } } @@ -250,10 +249,25 @@ namespace Tango.Touch.Controls if (Notifications is INotifyCollectionChanged) { - (Notifications as INotifyCollectionChanged).CollectionChanged += (_, __) => + (Notifications as INotifyCollectionChanged).CollectionChanged += (_, e) => { this.BeginInvoke(() => { + if (e.NewItems != null && e.NewItems.Count > 0) + { + foreach (var item in e.NewItems.Cast<Object>().ToList()) + { + var element = _items_control.ItemContainerGenerator.ContainerFromItem(item) as FrameworkElement; + if (element != null) + { + element.RegisterForLoadedOrNow((___, ____) => + { + ResizeNotification(element); + }); + } + } + } + UpdateExpanded(IsExpanded); }); }; |
