using HKCardOUT.ViewModels; using System.Linq; using System.Windows; using System.Windows.Controls; using System.Windows.Forms; using System.Windows.Media; namespace HKCardOUT.Views { public partial class RootView : HandyControl.Controls.Window { public RootView() { InitializeComponent(); this.Loaded += RootView_Loaded; } private void RootView_Loaded(object sender, RoutedEventArgs e) { (this.DataContext as RootViewModel).Main = this; } } }