private void Window_Loaded(object sender, RoutedEventArgs e) { service = new AppControlService(this); host = new ServiceHost(service); host.Open(); }