示例#1
0
 private static void SetDelayCollection(DependencyObject obj, ItemsControlExtension value)
 {
     obj.SetValue(_delayCollectionProperty, value);
 }
示例#2
0
        private static void OnItemsSourceChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            var control = sender as ItemsControl;
            if (control == null)
            {
                throw new InvalidOperationException("Codify.Controls.ItemsControlExtension.ItemsSource property can only be attached to a System.Windows.Controls.ItemsControl.");
            }

            var delayCollection = GetDelayCollection(control);
            if (delayCollection == null)
            {
                SetDelayCollection(control, delayCollection = new ItemsControlExtension());
            }
            delayCollection.Refersh();
        }