Skip to content

Commit f78d2fc

Browse files
committed
chore: Fix build errors and warning
1 parent d6c637b commit f78d2fc

File tree

3 files changed

+46
-61
lines changed

3 files changed

+46
-61
lines changed
Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,40 @@
11
using Microsoft.UI.Xaml;
22
using System;
3-
using Uno.UI.Runtime.Skia;
3+
using Uno.UI.Runtime.Skia.Linux.FrameBuffer;
44
using Windows.UI.Core;
55

6-
namespace MapControlSample
6+
namespace MapControlSample;
7+
8+
class Program
79
{
8-
class Program
9-
{
10-
static void Main(string[] args)
11-
{
12-
try
13-
{
14-
Console.CursorVisible = false;
10+
static void Main(string[] args)
11+
{
12+
try
13+
{
14+
Console.CursorVisible = false;
1515

16-
var host = new FrameBufferHost(() =>
17-
{
18-
// Framebuffer applications don't have a WindowManager to rely
19-
// on. To close the application, we can hook onto CoreWindow events
20-
// which dispatch keyboard input, and close the application as a result.
21-
// This block can be moved to App.xaml.cs if it does not interfere with other
22-
// platforms that may use the same keys.
23-
CoreWindow.GetForCurrentThread().KeyDown += (s, e) =>
24-
{
25-
if (e.VirtualKey == Windows.System.VirtualKey.F12)
26-
{
27-
Application.Current.Exit();
28-
}
29-
};
16+
var host = new FrameBufferHost(() =>
17+
{
18+
// Framebuffer applications don't have a WindowManager to rely
19+
// on. To close the application, we can hook onto CoreWindow events
20+
// which dispatch keyboard input, and close the application as a result.
21+
// This block can be moved to App.xaml.cs if it does not interfere with other
22+
// platforms that may use the same keys.
23+
CoreWindow.GetForCurrentThread().KeyDown += (s, e) =>
24+
{
25+
if (e.VirtualKey == Windows.System.VirtualKey.F12)
26+
{
27+
Application.Current.Exit();
28+
}
29+
};
3030

31-
return new App();
32-
});
33-
host.Run();
34-
}
35-
finally
36-
{
37-
Console.CursorVisible = true;
38-
}
39-
}
40-
}
31+
return new App();
32+
});
33+
host.Run();
34+
}
35+
finally
36+
{
37+
Console.CursorVisible = true;
38+
}
39+
}
4140
}
Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,17 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
61
using System.Windows;
7-
using System.Windows.Controls;
8-
using System.Windows.Data;
9-
using System.Windows.Documents;
10-
using System.Windows.Input;
11-
using System.Windows.Media;
12-
using System.Windows.Media.Imaging;
13-
using System.Windows.Navigation;
14-
using System.Windows.Shapes;
15-
using Uno.UI.Skia.Platform;
2+
using Uno.UI.Runtime.Skia.Wpf;
163

17-
namespace MapControlSample.WPF
4+
namespace MapControlSample.WPF;
5+
6+
/// <summary>
7+
/// Interaction logic for MainWindow.xaml
8+
/// </summary>
9+
public partial class MainWindow : Window
1810
{
19-
/// <summary>
20-
/// Interaction logic for MainWindow.xaml
21-
/// </summary>
22-
public partial class MainWindow : Window
23-
{
24-
public MainWindow()
25-
{
26-
InitializeComponent();
27-
28-
root.Content = new WpfHost(Dispatcher, () => new MapControlSample.App());
29-
}
30-
}
11+
public MainWindow()
12+
{
13+
InitializeComponent();
14+
15+
root.Content = new WpfHost(Dispatcher, () => new MapControlSample.App());
16+
}
3117
}

UI/MapControlSample/MapControlSample/MapControlSample.Wasm/MapControlSample.Wasm.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<ItemGroup>
4444
<PackageReference Include="Mapsui.Uno.WinUI" Version="4.1.2" />
4545
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
46-
<PackageReference Include="Microsoft.Windows.Compatibility" Version="7.0.1" />
46+
<PackageReference Include="Microsoft.Windows.Compatibility" Version="8.0.0" />
4747
<PackageReference Include="Uno.Extensions.Logging.WebAssembly.Console" Version="1.7.0" />
4848
<PackageReference Include="Uno.WinUI.WebAssembly" Version="5.0.64" />
4949
<PackageReference Include="Uno.WinUI.DevServer" Version="5.0.64" Condition="'$(Configuration)'=='Debug'" />

0 commit comments

Comments
 (0)