protected override void OnWindowCreated(WindowCreatedEventArgs args) { LayoutService.Instance.LayoutRoot = args.Window; base.OnWindowCreated(args); }