From ebb8623ca7fa899d968959f3f51eac2b1cd1f26c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wies=C5=82aw=20=C5=A0olt=C3=A9s?= Date: Sat, 14 May 2016 17:15:45 +0200 Subject: [PATCH] Updated Avalonia packages --- src/SpiroNet.Avalonia/App.xaml.cs | 12 ++---- src/SpiroNet.Avalonia/MainWindow.xaml.cs | 3 +- src/SpiroNet.Avalonia/Program.cs | 6 ++- .../SpiroNet.Avalonia.csproj | 42 +++++++++---------- src/SpiroNet.Avalonia/packages.config | 4 +- 5 files changed, 33 insertions(+), 34 deletions(-) diff --git a/src/SpiroNet.Avalonia/App.xaml.cs b/src/SpiroNet.Avalonia/App.xaml.cs index b351250..2cb36e0 100644 --- a/src/SpiroNet.Avalonia/App.xaml.cs +++ b/src/SpiroNet.Avalonia/App.xaml.cs @@ -19,21 +19,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA */ using Avalonia; +using Avalonia.Markup.Xaml; namespace SpiroNet.Avalonia { public class App : Application { - public App() + public override void Initialize() { - RegisterServices(); - } - - public void Start() - { - var mainWindow = new MainWindow(); - mainWindow.Show(); - Run(mainWindow); + AvaloniaXamlLoader.Load(this); } } } diff --git a/src/SpiroNet.Avalonia/MainWindow.xaml.cs b/src/SpiroNet.Avalonia/MainWindow.xaml.cs index fa42ee4..9ba8ca5 100644 --- a/src/SpiroNet.Avalonia/MainWindow.xaml.cs +++ b/src/SpiroNet.Avalonia/MainWindow.xaml.cs @@ -20,6 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA */ using Avalonia; using Avalonia.Controls; +using Avalonia.Markup.Xaml; namespace SpiroNet.Avalonia { @@ -33,7 +34,7 @@ namespace SpiroNet.Avalonia private void InitializeComponent() { - this.LoadFromXaml(); + AvaloniaXamlLoader.Load(this); } } } diff --git a/src/SpiroNet.Avalonia/Program.cs b/src/SpiroNet.Avalonia/Program.cs index 79d06b4..32e0064 100644 --- a/src/SpiroNet.Avalonia/Program.cs +++ b/src/SpiroNet.Avalonia/Program.cs @@ -19,6 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA */ using Avalonia; +using Avalonia.Controls; using Avalonia.Logging.Serilog; using Serilog; using System; @@ -33,7 +34,10 @@ namespace SpiroNet.Avalonia try { InitializeLogging(); - new App().UseWin32().UseDirect2D().LoadFromXaml().Start(); + AppBuilder.Configure() + .UseWin32() + .UseDirect2D1() + .Start(); } catch (Exception ex) { diff --git a/src/SpiroNet.Avalonia/SpiroNet.Avalonia.csproj b/src/SpiroNet.Avalonia/SpiroNet.Avalonia.csproj index 237114e..26ee0a3 100644 --- a/src/SpiroNet.Avalonia/SpiroNet.Avalonia.csproj +++ b/src/SpiroNet.Avalonia/SpiroNet.Avalonia.csproj @@ -38,83 +38,83 @@ - ..\..\packages\Avalonia.0.2.0.1518-alpha\lib\portable-windows8+net45\Avalonia.Animation.dll + ..\..\packages\Avalonia.0.2.0.1523-alpha\lib\portable-windows8+net45\Avalonia.Animation.dll True - ..\..\packages\Avalonia.0.2.0.1518-alpha\lib\portable-windows8+net45\Avalonia.Base.dll + ..\..\packages\Avalonia.0.2.0.1523-alpha\lib\portable-windows8+net45\Avalonia.Base.dll True - ..\..\packages\Avalonia.Desktop.0.2.0.1518-alpha\lib\net45\Avalonia.Cairo.dll + ..\..\packages\Avalonia.Desktop.0.2.0.1523-alpha\lib\net45\Avalonia.Cairo.dll True - ..\..\packages\Avalonia.0.2.0.1518-alpha\lib\portable-windows8+net45\Avalonia.Controls.dll + ..\..\packages\Avalonia.0.2.0.1523-alpha\lib\portable-windows8+net45\Avalonia.Controls.dll True - ..\..\packages\Avalonia.0.2.0.1518-alpha\lib\portable-windows8+net45\Avalonia.DesignerSupport.dll + ..\..\packages\Avalonia.0.2.0.1523-alpha\lib\portable-windows8+net45\Avalonia.DesignerSupport.dll True - ..\..\packages\Avalonia.0.2.0.1518-alpha\lib\portable-windows8+net45\Avalonia.Diagnostics.dll + ..\..\packages\Avalonia.0.2.0.1523-alpha\lib\portable-windows8+net45\Avalonia.Diagnostics.dll True - ..\..\packages\Avalonia.Desktop.0.2.0.1518-alpha\lib\net45\Avalonia.Direct2D1.dll + ..\..\packages\Avalonia.Desktop.0.2.0.1523-alpha\lib\net45\Avalonia.Direct2D1.dll True - - ..\..\packages\Avalonia.Desktop.0.2.0.1518-alpha\lib\net45\Avalonia.Gtk.dll + + ..\..\packages\Avalonia.Desktop.0.2.0.1523-alpha\lib\net45\Avalonia.Gtk.dll True - ..\..\packages\Avalonia.0.2.0.1518-alpha\lib\portable-windows8+net45\Avalonia.HtmlRenderer.dll + ..\..\packages\Avalonia.0.2.0.1523-alpha\lib\portable-windows8+net45\Avalonia.HtmlRenderer.dll True - ..\..\packages\Avalonia.0.2.0.1518-alpha\lib\portable-windows8+net45\Avalonia.Input.dll + ..\..\packages\Avalonia.0.2.0.1523-alpha\lib\portable-windows8+net45\Avalonia.Input.dll True - ..\..\packages\Avalonia.0.2.0.1518-alpha\lib\portable-windows8+net45\Avalonia.Interactivity.dll + ..\..\packages\Avalonia.0.2.0.1523-alpha\lib\portable-windows8+net45\Avalonia.Interactivity.dll True - ..\..\packages\Avalonia.0.2.0.1518-alpha\lib\portable-windows8+net45\Avalonia.Layout.dll + ..\..\packages\Avalonia.0.2.0.1523-alpha\lib\portable-windows8+net45\Avalonia.Layout.dll True - ..\..\packages\Avalonia.0.2.0.1518-alpha\lib\portable-windows8+net45\Avalonia.Logging.Serilog.dll + ..\..\packages\Avalonia.0.2.0.1523-alpha\lib\portable-windows8+net45\Avalonia.Logging.Serilog.dll True - ..\..\packages\Avalonia.0.2.0.1518-alpha\lib\portable-windows8+net45\Avalonia.Markup.dll + ..\..\packages\Avalonia.0.2.0.1523-alpha\lib\portable-windows8+net45\Avalonia.Markup.dll True - ..\..\packages\Avalonia.0.2.0.1518-alpha\lib\portable-windows8+net45\Avalonia.Markup.Xaml.dll + ..\..\packages\Avalonia.0.2.0.1523-alpha\lib\portable-windows8+net45\Avalonia.Markup.Xaml.dll True - ..\..\packages\Avalonia.0.2.0.1518-alpha\lib\portable-windows8+net45\Avalonia.ReactiveUI.dll + ..\..\packages\Avalonia.0.2.0.1523-alpha\lib\portable-windows8+net45\Avalonia.ReactiveUI.dll True - ..\..\packages\Avalonia.0.2.0.1518-alpha\lib\portable-windows8+net45\Avalonia.SceneGraph.dll + ..\..\packages\Avalonia.0.2.0.1523-alpha\lib\portable-windows8+net45\Avalonia.SceneGraph.dll True - ..\..\packages\Avalonia.0.2.0.1518-alpha\lib\portable-windows8+net45\Avalonia.Styling.dll + ..\..\packages\Avalonia.0.2.0.1523-alpha\lib\portable-windows8+net45\Avalonia.Styling.dll True - ..\..\packages\Avalonia.0.2.0.1518-alpha\lib\portable-windows8+net45\Avalonia.Themes.Default.dll + ..\..\packages\Avalonia.0.2.0.1523-alpha\lib\portable-windows8+net45\Avalonia.Themes.Default.dll True - ..\..\packages\Avalonia.Desktop.0.2.0.1518-alpha\lib\net45\Avalonia.Win32.dll + ..\..\packages\Avalonia.Desktop.0.2.0.1523-alpha\lib\net45\Avalonia.Win32.dll True diff --git a/src/SpiroNet.Avalonia/packages.config b/src/SpiroNet.Avalonia/packages.config index 65b6c94..ec45687 100644 --- a/src/SpiroNet.Avalonia/packages.config +++ b/src/SpiroNet.Avalonia/packages.config @@ -1,7 +1,7 @@  - - + +