Esempio n. 1
0
 protected virtual void OnCollectionChanged(RadListBoxItemCollectionChangedEventArgs e)
 {
     if (CollectionChanged != null)
     {
         CollectionChanged(this, e);
     }
 }
Esempio n. 2
0
        protected override void OnClearComplete()
        {
            base.OnClearComplete();
            RadListBoxItemCollectionChangedEventArgs args = new RadListBoxItemCollectionChangedEventArgs(null, null, ItemsChangeOperation.Cleared);

            this.OnCollectionChanged(args);
        }
Esempio n. 3
0
        protected override void OnRemoveComplete(int index, object value)
        {
            //((RadListBoxItem)value).Selected = false;
            ((RadItem)value).SetValue(RadListBoxItem.SelectedProperty, false);
            base.OnRemoveComplete(index, value);
            RadListBoxItemCollectionChangedEventArgs args = new RadListBoxItemCollectionChangedEventArgs((RadItem)value, null, ItemsChangeOperation.Removed);

            this.OnCollectionChanged(args);
        }
Esempio n. 4
0
        protected override void OnInsertComplete(int index, object value)
        {
            RadItem item = (RadItem)value;

            item.SetValue(RadListBoxItem.SelectedProperty, true);
            base.OnInsertComplete(index, value);
            RadListBoxItemCollectionChangedEventArgs args = new RadListBoxItemCollectionChangedEventArgs(null, item, ItemsChangeOperation.Inserted);

            this.OnCollectionChanged(args);
        }
Esempio n. 5
0
        protected override void OnSetComplete(int index, object oldValue, object newValue)
        {
            //((RadListBoxItem)oldValue).Selected = false;
            //((RadListBoxItem)newValue).Selected = true;
            ((RadItem)oldValue).SetValue(RadListBoxItem.SelectedProperty, false);
            ((RadItem)newValue).SetValue(RadListBoxItem.SelectedProperty, true);
            base.OnSetComplete(index, oldValue, newValue);
            RadListBoxItemCollectionChangedEventArgs args = new RadListBoxItemCollectionChangedEventArgs((RadItem)oldValue, (RadItem)newValue, ItemsChangeOperation.Set);

            this.OnCollectionChanged(args);
        }
Esempio n. 6
0
        protected override void OnClear()
        {
            foreach (RadItem item in this.List)
            {
                //item.Selected = false;
                item.SetValue(RadListBoxItem.SelectedProperty, false);
            }
            base.OnClear();
            RadListBoxItemCollectionChangedEventArgs args = new RadListBoxItemCollectionChangedEventArgs(null, null, ItemsChangeOperation.Clearing);

            this.OnCollectionChanged(args);
        }