Multi-Platform Package Manager for Stable Diffusion
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

22 lines
578 B

using Avalonia.Interactivity;
using FluentAvalonia.UI.Windowing;
using StabilityMatrix.Avalonia.ViewModels;
namespace StabilityMatrix.Avalonia.Controls;
public class AppWindowBase : AppWindow
{
protected AppWindowBase()
{
AddHandler(LoadedEvent, OnLoaded);
}
public virtual async void OnLoaded(object? sender, RoutedEventArgs e)
{
if (DataContext is not ViewModelBase viewModel) return;
// ReSharper disable once MethodHasAsyncOverload
viewModel.OnLoaded();
await viewModel.OnLoadedAsync();
}
}