diff --git a/PurpleExplorer/App.xaml b/PurpleExplorer/App.axaml
similarity index 81%
rename from PurpleExplorer/App.xaml
rename to PurpleExplorer/App.axaml
index 31c2ef3..cc86af2 100644
--- a/PurpleExplorer/App.xaml
+++ b/PurpleExplorer/App.axaml
@@ -3,16 +3,16 @@
xmlns:local="clr-namespace:PurpleExplorer"
xmlns:vm="clr-namespace:PurpleExplorer.ViewModels;assembly=PurpleExplorer"
x:Class="PurpleExplorer.App"
+ RequestedThemeVariant="Default"
Name="Purple Explorer">
-
-
-
+
+
diff --git a/PurpleExplorer/App.xaml.cs b/PurpleExplorer/App.axaml.cs
similarity index 98%
rename from PurpleExplorer/App.xaml.cs
rename to PurpleExplorer/App.axaml.cs
index 57d9e45..456bf2a 100644
--- a/PurpleExplorer/App.xaml.cs
+++ b/PurpleExplorer/App.axaml.cs
@@ -31,7 +31,7 @@ public override void OnFrameworkInitializationCompleted()
RxApp.SuspensionHost.CreateNewAppState = () => new AppState();
RxApp.SuspensionHost.SetupDefaultSuspendResume(new NewtonsoftJsonSuspensionDriver(appStatePath));
suspension.OnFrameworkInitializationCompleted();
- var state = RxApp.SuspensionHost.GetAppState();
+ var state = RxApp.SuspensionHost.GetAppState() ?? new AppState();
Locator.CurrentMutable.RegisterLazySingleton(() => state, typeof(IAppState));
Locator.CurrentMutable.RegisterLazySingleton(() => new LoggingService(), typeof(ILoggingService));
diff --git a/PurpleExplorer/Helpers/MessageBoxHelper.cs b/PurpleExplorer/Helpers/MessageBoxHelper.cs
index 6f418b4..5c4e1d9 100644
--- a/PurpleExplorer/Helpers/MessageBoxHelper.cs
+++ b/PurpleExplorer/Helpers/MessageBoxHelper.cs
@@ -1,7 +1,7 @@
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
-using MessageBox.Avalonia.DTO;
-using MessageBox.Avalonia.Enums;
+using MsBox.Avalonia.Dto;
+using MsBox.Avalonia.Enums;
using System.Threading.Tasks;
namespace PurpleExplorer.Helpers;
@@ -27,7 +27,7 @@ public static async Task ShowMessage(string title, string message)
private static async Task ShowMessageBox(ButtonEnum buttons, Icon icon, string title, string message)
{
- var msBoxStandardWindow = MessageBox.Avalonia.MessageBoxManager.GetMessageBoxStandardWindow(new MessageBoxStandardParams
+ var msBoxStandardWindow = MsBox.Avalonia.MessageBoxManager.GetMessageBoxStandard(new MessageBoxStandardParams
{
ButtonDefinitions = buttons,
ContentTitle = title,
@@ -37,8 +37,6 @@ private static async Task ShowMessageBox(ButtonEnum buttons, Icon
CanResize = true,
WindowStartupLocation = Avalonia.Controls.WindowStartupLocation.CenterOwner
});
-
- return await msBoxStandardWindow.ShowDialog((Application.Current.ApplicationLifetime as IClassicDesktopStyleApplicationLifetime)
- .Windows[0]);
+ return await msBoxStandardWindow.ShowAsync();
}
}
\ No newline at end of file
diff --git a/PurpleExplorer/Helpers/TopicHelper.cs b/PurpleExplorer/Helpers/TopicHelper.cs
index 9774ee4..a8d4873 100644
--- a/PurpleExplorer/Helpers/TopicHelper.cs
+++ b/PurpleExplorer/Helpers/TopicHelper.cs
@@ -7,7 +7,6 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
-using AvaloniaEdit.Utils;
using Message = PurpleExplorer.Models.Message;
using AzureMessage = Microsoft.Azure.ServiceBus.Message;
diff --git a/PurpleExplorer/Program.cs b/PurpleExplorer/Program.cs
index e246488..8241ece 100644
--- a/PurpleExplorer/Program.cs
+++ b/PurpleExplorer/Program.cs
@@ -15,10 +15,13 @@ public static void Main(string[] args) => BuildAvaloniaApp()
// Avalonia configuration, don't remove; also used by visual designer.
public static AppBuilder BuildAvaloniaApp()
- => AppBuilder.Configure()
+ {
+ IconProvider.Current
+ .Register();
+
+ return AppBuilder.Configure()
.UsePlatformDetect()
.LogToTrace()
- .UseReactiveUI()
- .WithIcons(container => container
- .Register());
-}
\ No newline at end of file
+ .UseReactiveUI();
+ }
+}
diff --git a/PurpleExplorer/PurpleExplorer.csproj b/PurpleExplorer/PurpleExplorer.csproj
index f4ab090..67b7f5b 100644
--- a/PurpleExplorer/PurpleExplorer.csproj
+++ b/PurpleExplorer/PurpleExplorer.csproj
@@ -18,16 +18,17 @@
-
-
-
+
+
+
-
-
-
+
+
+
+
-
-
+
+
diff --git a/PurpleExplorer/ViewLocator.cs b/PurpleExplorer/ViewLocator.cs
index 54e0886..b4129c6 100644
--- a/PurpleExplorer/ViewLocator.cs
+++ b/PurpleExplorer/ViewLocator.cs
@@ -12,7 +12,7 @@ public class ViewLocator : IDataTemplate
{
public bool SupportsRecycling => false;
- public IControl Build(object data)
+ public Control Build(object data)
{
var name = data.GetType().FullName.Replace("ViewModel", "View");
var type = Type.GetType(name);
diff --git a/PurpleExplorer/ViewModels/MainWindowViewModel.cs b/PurpleExplorer/ViewModels/MainWindowViewModel.cs
index b494206..15ea22f 100644
--- a/PurpleExplorer/ViewModels/MainWindowViewModel.cs
+++ b/PurpleExplorer/ViewModels/MainWindowViewModel.cs
@@ -8,7 +8,7 @@
using PurpleExplorer.Views;
using ReactiveUI;
using System.Threading.Tasks;
-using MessageBox.Avalonia.Enums;
+using MsBox.Avalonia.Enums;
using Microsoft.Azure.ServiceBus;
using PurpleExplorer.Services;
using Splat;
diff --git a/PurpleExplorer/ViewModels/MessageDetailsWindowViewModel.cs b/PurpleExplorer/ViewModels/MessageDetailsWindowViewModel.cs
index 2cfd0ab..9ff2a0d 100644
--- a/PurpleExplorer/ViewModels/MessageDetailsWindowViewModel.cs
+++ b/PurpleExplorer/ViewModels/MessageDetailsWindowViewModel.cs
@@ -1,6 +1,6 @@
using System.Threading.Tasks;
using Avalonia.Controls;
-using MessageBox.Avalonia.Enums;
+using MsBox.Avalonia.Enums;
using PurpleExplorer.Helpers;
using PurpleExplorer.Models;
using PurpleExplorer.Services;
diff --git a/PurpleExplorer/Views/AddMessageWindow.xaml b/PurpleExplorer/Views/AddMessageWindow.xaml
index 71b86d1..743f2a6 100644
--- a/PurpleExplorer/Views/AddMessageWindow.xaml
+++ b/PurpleExplorer/Views/AddMessageWindow.xaml
@@ -47,7 +47,7 @@
TextWrapping="Wrap" Text="{Binding Path=Title, Mode=TwoWay}" Watermark="Save message with title:" />
-
diff --git a/PurpleExplorer/Views/ConnectionStringWindow.xaml b/PurpleExplorer/Views/ConnectionStringWindow.xaml
index 696762a..d60f135 100644
--- a/PurpleExplorer/Views/ConnectionStringWindow.xaml
+++ b/PurpleExplorer/Views/ConnectionStringWindow.xaml
@@ -45,7 +45,7 @@
diff --git a/PurpleExplorer/Views/MainWindow.xaml b/PurpleExplorer/Views/MainWindow.xaml
index b6b928b..fa1947b 100644
--- a/PurpleExplorer/Views/MainWindow.xaml
+++ b/PurpleExplorer/Views/MainWindow.xaml
@@ -84,7 +84,7 @@
-
+
@@ -122,7 +122,7 @@
-
+
@@ -157,7 +157,7 @@
-
@@ -172,7 +172,7 @@
-
diff --git a/PurpleExplorer/Views/MainWindow.xaml.cs b/PurpleExplorer/Views/MainWindow.xaml.cs
index f549cb6..4b613f7 100644
--- a/PurpleExplorer/Views/MainWindow.xaml.cs
+++ b/PurpleExplorer/Views/MainWindow.xaml.cs
@@ -1,5 +1,6 @@
using Avalonia;
using Avalonia.Controls;
+using Avalonia.Input;
using Avalonia.Interactivity;
using Avalonia.Markup.Xaml;
using PurpleExplorer.Helpers;
@@ -23,7 +24,7 @@ private void InitializeComponent()
AvaloniaXamlLoader.Load(this);
}
- private async void MessagesGrid_DoubleTapped(object sender, RoutedEventArgs e)
+ private async void MessagesGrid_DoubleTapped(object sender, TappedEventArgs e)
{
var grid = sender as DataGrid;
var mainWindowViewModel = DataContext as MainWindowViewModel;
@@ -44,7 +45,7 @@ private async void MessagesGrid_DoubleTapped(object sender, RoutedEventArgs e)
await ModalWindowHelper.ShowModalWindow(viewModal);
}
- private void MessagesGrid_Tapped(object sender, RoutedEventArgs e)
+ public void MessagesGrid_Tapped(object sender, TappedEventArgs e)
{
var grid = sender as DataGrid;
var mainWindowViewModel = DataContext as MainWindowViewModel;
diff --git a/PurpleExplorer/Views/MessageDetailsWindow.xaml b/PurpleExplorer/Views/MessageDetailsWindow.xaml
index 330a6a7..f7fd8c3 100644
--- a/PurpleExplorer/Views/MessageDetailsWindow.xaml
+++ b/PurpleExplorer/Views/MessageDetailsWindow.xaml
@@ -2,6 +2,7 @@
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:i="clr-namespace:Projektanker.Icons.Avalonia;assembly=Projektanker.Icons.Avalonia"
mc:Ignorable="d" d:DesignWidth="780" d:DesignHeight="630"
x:Class="PurpleExplorer.Views.MessageDetailsWindow"
xmlns:vm="clr-namespace:PurpleExplorer.ViewModels;assembly=PurpleExplorer"
@@ -46,7 +47,7 @@
Command="{Binding DeleteMessage}"
CommandParameter="{Binding $parent[Window]}">
-
+
Delete message
@@ -54,7 +55,7 @@
IsVisible="{Binding !Message.IsDlq}"
Classes="topButton">
-
+
Send to dead-letter
@@ -62,7 +63,7 @@
IsVisible="{Binding !!Message.IsDlq}"
Classes="topButton">
-
+
Resubmit back to topic