public DataBinding()
 {
     this.InitializeComponent();
     listBinding = dataBindArea.Content as ListBinding;
     observableCollectionBinding = new ObservableCollectionBinding();
     dynamicObjectsBinding       = new DynamicObjectsBinding();
     this.DataContext            = new DataBindingViewModel();
     this.dataBindingComboBox.SelectionChanged += OnSelectionChanged;
 }
 /// <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();
 }