예제 #1
0
 public FieldAreaList()
 {
     InitializeComponent();
     //Empty DataContext preload to avoid System.Windows.Data Error: 40 : BindingExpression path error
     DataContext = new FieldAreaListVM(CaseType.Unknown);
     Loaded     += FieldAreaList_Loaded;
     Application.Current.Exit += CurrentOnExit;
 }
예제 #2
0
        private void FieldAreaList_Loaded(object sender, RoutedEventArgs e)
        {
            if (!_dataContextLoaded)
            {
                DataContext        = new FieldAreaListVM(CaseType);
                _dataContextLoaded = true;
            }

            if (_tabIdentifier == null)
            {
                _tabIdentifier = this.Name;
            }

            if (!_columnsLoaded)
            {
                LoadColumnState();
            }
        }