Browse Source

Add Clipboard to App

pull/165/head
Ionite 1 year ago
parent
commit
0d6b3d9156
No known key found for this signature in database
  1. 5
      StabilityMatrix.Avalonia/App.axaml.cs

5
StabilityMatrix.Avalonia/App.axaml.cs

@ -16,6 +16,7 @@ using System.Threading.Tasks;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Input.Platform;
using Avalonia.Markup.Xaml;
using Avalonia.Platform;
using Avalonia.Platform.Storage;
@ -87,6 +88,9 @@ public sealed class App : Application
[NotNull]
public static IStorageProvider? StorageProvider { get; private set; }
[NotNull]
public static IClipboard? Clipboard { get; private set; }
// ReSharper disable once MemberCanBePrivate.Global
[NotNull]
public static IConfiguration? Config { get; private set; }
@ -212,6 +216,7 @@ public sealed class App : Application
VisualRoot = mainWindow;
StorageProvider = mainWindow.StorageProvider;
Clipboard = mainWindow.Clipboard ?? throw new NullReferenceException("Clipboard is null");
DesktopLifetime.MainWindow = mainWindow;
DesktopLifetime.Exit += OnExit;

Loading…
Cancel
Save