private void Resume() { if (Container.IsRegistered(typeof(ISocketConnection))) { if (!Container.Resolve<ISocketConnection>().IsConnected) Container.Resolve<ISocketConnection>().Connect(); } Window.Current.Activate(); }