private void releaseDataContext()
 {
     if (this.viewModel != null)
     {
         this.viewModel.Dispose();
         this.viewModel = null;
     }
 }
 /// <summary>
 /// Setup the DataContext for the UserControl.
 /// </summary>
 private void acquireDataContext()
 {
     this.releaseDataContext();
     this.viewModel   = new ComponentTrackerViewModel();
     this.DataContext = this.viewModel;
 }
Beispiel #3
0
        //Version History:
        //07/25/18: Created

        #region Constructor

        /// <summary>
        /// Constructor that accepts a view model to assign Data Context to
        /// </summary>
        public EditSystemWindow(ComponentTrackerViewModel vM)
        {
            InitializeComponent();
            this.DataContext = new EditSystemViewModel(vM);
        }