/// <summary>
        /// Initialize the main window (hence, this function runs on application start).
        /// You should initialize your SurfacePlotViewModel here, and set it as the
        /// DataContext for your SurfacePlotView (which is defined in MainWindow.xaml).
        /// </summary>
        public MainWindow()
        {
            InitializeComponent();

            // Initialize surface plot objects
            viewModel = new SurfacePlotModel();
            propertyGrid.DataContext = viewModel;
            surfacePlotView.DataContext = viewModel;

            // Populate the functionSelectorComboBox
            functionSelectorComboBox.ItemsSource = Enum.GetValues(typeof(FunctionOptions));
        }
Example #2
0
        /// <summary>
        /// Initialize the main window (hence, this function runs on application start).
        /// You should initialize your SurfacePlotViewModel here, and set it as the
        /// DataContext for your SurfacePlotView (which is defined in MainWindow.xaml).
        /// </summary>
        public MainWindow()
        {
            InitializeComponent();

            // Initialize surface plot objects
            viewModel = new SurfacePlotModel();
            propertyGrid.DataContext    = viewModel;
            surfacePlotView.DataContext = viewModel;

            // Populate the functionSelectorComboBox
            functionSelectorComboBox.ItemsSource = Enum.GetValues(typeof(FunctionOptions));
        }