Skip to content

Instantly share code, notes, and snippets.

@erikdietrich
Created November 14, 2012 06:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikdietrich/4070734 to your computer and use it in GitHub Desktop.
Save erikdietrich/4070734 to your computer and use it in GitHub Desktop.
Code behind for the main window
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace WpfScratchpad
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
private readonly MainWindowViewModel _viewModel;
public MainWindow()
{
InitializeComponent();
DataContext =_viewModel = new MainWindowViewModel("Please Select");
}
private void HandleButtonClick(object sender, RoutedEventArgs e)
{
Application.Current.Shutdown();
}
private void HandleDropDownOpened(object sender, EventArgs e)
{
_viewModel.RemoveSelect();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment