Esempio n. 1
0
        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);
            }
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
 void OnItemInfoThumbButtonInfosChanged(DependencyPropertyChangedEventArgs e)
 {
     ThumbButtonInfos = new TaskbarThumbButtonInfoCollection((ThumbButtonInfoCollection)e.NewValue);
 }