public FormMain() { proxy = new WPFProxy(this); Devices = proxy.GetDeviceList(); InitializeComponent(); SplashScreenHelper.Hide(); DispatcherTimer timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromSeconds(1); timer.Tick += timer_Tick; timer.Start(); MenuItemMainView.IsChecked = true; popup.CustomPopupPlacementCallback = new CustomPopupPlacementCallback(placePopup); DataContext = this; proxy.Connect(); }