protected virtual void OnThumbButtonInfosChanged(DependencyPropertyChangedEventArgs e) { TaskbarThumbButtonInfoCollection collection = (TaskbarThumbButtonInfoCollection)e.NewValue; ItemInfo.ThumbButtonInfos = collection.InternalCollection; UpdateInternalItems(); }
protected virtual void OnThumbButtonInfosChanged(DependencyPropertyChangedEventArgs e) { TaskbarThumbButtonInfoCollection collection = (TaskbarThumbButtonInfoCollection)e.NewValue; ItemInfo.ThumbButtonInfos = collection.InternalCollection; GetInternalItems(this).Clear(); foreach (TaskbarThumbButtonInfo item in collection) { GetInternalItems(this).Add(item); } }
bool ShouldUpdateInternalItems() { if (!IsAttached) { return(false); } TaskbarThumbButtonInfoCollection collection = ThumbButtonInfos; FreezableCollection <TaskbarThumbButtonInfo> collection2 = GetInternalItems(this); if (collection.Count != collection2.Count) { return(true); } for (int i = 0; i < collection.Count; i++) { var item1 = collection[i]; var item2 = collection2[i]; if (item1 != item2) { return(true); } } return(false); }
void OnItemInfoThumbButtonInfosChanged(DependencyPropertyChangedEventArgs e) { ThumbButtonInfos = new TaskbarThumbButtonInfoCollection((ThumbButtonInfoCollection)e.NewValue); }