Пример #1
0
 /// <summary>
 /// Binds the specified new element.
 /// </summary>
 /// <param name="newElement">The new element.</param>
 private void Bind(DynamicListView <T> newElement)
 {
     if (newElement != null)
     {
         _tableView.ItemsSource      = Element.Data;
         newElement.PropertyChanged += ElementPropertyChanged;
     }
 }
 /// <summary>
 /// Binds the specified new element.
 /// </summary>
 /// <param name="newElement">The new element.</param>
 private void Bind(DynamicListView <T> newElement)
 {
     if (newElement != null)
     {
         newElement.PropertyChanging       += ElementPropertyChanging;
         newElement.PropertyChanged        += ElementPropertyChanged;
         newElement.Data.CollectionChanged += DataCollectionChanged;
     }
 }
Пример #3
0
        /// <summary>
        /// Unbinds the specified old element.
        /// </summary>
        /// <param name="oldElement">The old element.</param>
        private void Unbind(DynamicListView <T> oldElement)
        {
            if (oldElement != null)
            {
                oldElement.PropertyChanged -= ElementPropertyChanged;
            }

            _tableView.ItemsSource = null;
        }
 /// <summary>
 /// Unbinds the specified old element.
 /// </summary>
 /// <param name="oldElement">The old element.</param>
 private void Unbind(DynamicListView <T> oldElement)
 {
     if (oldElement != null)
     {
         oldElement.PropertyChanging       += ElementPropertyChanging;
         oldElement.PropertyChanged        -= ElementPropertyChanged;
         oldElement.Data.CollectionChanged += DataCollectionChanged;
     }
 }