예제 #1
0
        /// <summary>
        /// Handles the Loaded event of the Window control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private void WindowLoaded(object sender, RoutedEventArgs e)
        {
            SymbolSelector.SelectedIndex = 0;

            // Lets grab the data context
            _vm = DataContext as StockViewModel;

            if (_vm == null)
            {
                throw new NullReferenceException("DataContext must be of type CutterViewModel");
            }

            ResetWarning();
            _vm.LoadList();
            ShowWarning();
        }