Skip to content

Commit d4aaf04

Browse files
committed
chore(SkiaSharpTest): Migrating WpfHost in SkiaSharpTest
Fix the running error as: > If you are seeing this, make sure to follow the "Migrating WpfHost" section of Migrating from previous releases article in the Uno Platform documentation at https://aka.platform.uno/uno5-wpfhost-migration. WpfHost is used at the application level instead of window level starting Uno Platform 5.0.
1 parent 9435cd2 commit d4aaf04

File tree

4 files changed

+8
-42
lines changed

4 files changed

+8
-42
lines changed

UI/SkiaSharpTest/SkiaSharpTest/SkiaSharpTest.Skia.WPF/App.xaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<Application x:Class="SkiaSharpTest.WPF.App"
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4-
xmlns:local="clr-namespace:SkiaSharpTest.WPF"
5-
StartupUri="MainWindow.xaml">
4+
xmlns:local="clr-namespace:SkiaSharpTest.WPF">
65
<Application.Resources>
76

87
</Application.Resources>

UI/SkiaSharpTest/SkiaSharpTest/SkiaSharpTest.Skia.WPF/App.xaml.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,19 @@
66
using System.Threading.Tasks;
77
using System.Windows;
88

9+
using Uno.UI.Runtime.Skia.Wpf;
10+
911
namespace SkiaSharpTest.WPF
1012
{
1113
/// <summary>
1214
/// Interaction logic for App.xaml
1315
/// </summary>
1416
public partial class App : Application
1517
{
18+
public App()
19+
{
20+
var host = new WpfHost(Dispatcher, () => new SkiaSharpTest.App());
21+
host.Run();
22+
}
1623
}
1724
}

UI/SkiaSharpTest/SkiaSharpTest/SkiaSharpTest.Skia.WPF/MainWindow.xaml

Lines changed: 0 additions & 10 deletions
This file was deleted.

UI/SkiaSharpTest/SkiaSharpTest/SkiaSharpTest.Skia.WPF/MainWindow.xaml.cs

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)