Merge pull request #627 from lindexi/t/lindexi/MigratingWpfHost

chore(SkiaSharpTest): Migrating WpfHost in SkiaSharpTest
This commit is contained in:
Jérôme Laban 2024-07-29 15:16:46 -04:00 коммит произвёл GitHub
Родитель d82132390c d4aaf049fa
Коммит 1de0a8145b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
4 изменённых файлов: 8 добавлений и 42 удалений

Просмотреть файл

@ -1,8 +1,7 @@
<Application x:Class="SkiaSharpTest.WPF.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:SkiaSharpTest.WPF"
StartupUri="MainWindow.xaml">
xmlns:local="clr-namespace:SkiaSharpTest.WPF">
<Application.Resources>
</Application.Resources>

Просмотреть файл

@ -6,6 +6,8 @@ using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using Uno.UI.Runtime.Skia.Wpf;
namespace SkiaSharpTest.WPF
{
/// <summary>
@ -13,5 +15,10 @@ namespace SkiaSharpTest.WPF
/// </summary>
public partial class App : Application
{
public App()
{
var host = new WpfHost(Dispatcher, () => new SkiaSharpTest.App());
host.Run();
}
}
}

Просмотреть файл

@ -1,10 +0,0 @@
<Window x:Class="SkiaSharpTest.WPF.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SkiaSharpTest.WPF"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<ContentControl x:Name="root"/>
</Window>

Просмотреть файл

@ -1,30 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace SkiaSharpTest.WPF
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
root.Content = new global::Uno.UI.Runtime.Skia.Wpf.WpfHost(Dispatcher, () => new SkiaSharpTest.App());
}
}
}