Skip to content

Commit 929cb9b

Browse files
committed
Fix XamlApp to use CreateWindow for now
1 parent 3143ba3 commit 929cb9b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Controls/samples/Controls.Sample/XamlApp.xaml.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ public XamlApp(IServiceProvider services, ITextService textService)
1717

1818
Debug.WriteLine($"The .NET Purple color is {Resources["DotNetPurple"]}");
1919
Debug.WriteLine($"The injected text service had a message: '{textService.GetText()}'");
20+
}
2021

21-
MainPage = Services.GetRequiredService<Page>();
22+
protected override Window CreateWindow(IActivationState activationState)
23+
{
24+
return new Window(Services.GetRequiredService<Page>());
2225
}
2326

2427
public IServiceProvider Services { get; }

0 commit comments

Comments
 (0)