Ejemplo n.º 1
0
 /// <summary>
 /// Dispose of unmanaged resources.
 /// </summary>
 public void Dispose()
 {
     this.listBinding = null;
     this.observableCollectionBinding = null;
     this.dynamicObjectsBinding       = null;
     this.Resources.Clear();
     this.dataBindingComboBox.SelectionChanged -= OnSelectionChanged;
     if (dataBindArea.Content is ListBinding)
     {
         (dataBindArea.Content as ListBinding).Dispose();
         ((dataBindArea.Content as ListBinding).Content as Grid).Children.Clear();
     }
     else if (dataBindArea.Content is ObservableCollectionBinding)
     {
         (dataBindArea.Content as ObservableCollectionBinding).Dispose();
         ((dataBindArea.Content as ObservableCollectionBinding).Content as Grid).Children.Clear();
     }
     else
     {
         (dataBindArea.Content as DynamicObjectsBinding).Dispose();
         ((dataBindArea.Content as DynamicObjectsBinding).Content as Grid).Children.Clear();
     }
     dataBindArea = null;
     if (this.dataBindingComboBox != null)
     {
         this.dataBindingComboBox = null;
     }
 }
Ejemplo n.º 2
0
 public DataBinding()
 {
     this.InitializeComponent();
     listBinding = new ListBinding();
     observableCollectionBinding         = new ObservableCollectionBinding();
     this.DataContext                    = new DataBoundViewModel();
     this.comboBinding.SelectionChanged += OnSelectionChanged;
 }
Ejemplo n.º 3
0
 public DataBinding()
 {
     this.InitializeComponent();
     listBinding = dataBindArea.Content as ListBinding;
     observableCollectionBinding = new ObservableCollectionBinding();
     dynamicObjectsBinding       = new DynamicObjectsBinding();
     this.DataContext            = new DataBindingViewModel();
     this.dataBindingComboBox.SelectionChanged += OnSelectionChanged;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Dispose of unmanaged resources.
 /// </summary>
 public sealed override void Dispose()
 {
     this.listBinding.Dispose();
     this.observableCollectionBinding.Dispose();
     this.listBinding = null;
     this.observableCollectionBinding = null;
     this.Resources.Clear();
     this.comboBinding.SelectionChanged -= OnSelectionChanged;
     if (dataBindArea.Content is ListBinding)
     {
         (dataBindArea.Content as ListBinding).Dispose();
         ((dataBindArea.Content as ListBinding).Content as Grid).Children.Clear();
     }
     else
     {
         (dataBindArea.Content as ObservableCollectionBinding).Dispose();
         ((dataBindArea.Content as ObservableCollectionBinding).Content as Grid).Children.Clear();
     }
     dataBindArea = null;
     base.Dispose();
 }