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.
28 lines
820 B
28 lines
820 B
1 year ago
|
using System;
|
||
|
using FluentAvalonia.UI.Controls;
|
||
|
|
||
|
namespace StabilityMatrix.Avalonia.ViewModels.Dialogs;
|
||
|
|
||
|
public class ContentDialogViewModelBase : ViewModelBase
|
||
|
{
|
||
|
// Events for button clicks
|
||
|
public event EventHandler<ContentDialogResult>? PrimaryButtonClick;
|
||
|
public event EventHandler<ContentDialogResult>? SecondaryButtonClick;
|
||
|
public event EventHandler<ContentDialogResult>? CloseButtonClick;
|
||
|
|
||
|
public virtual void OnPrimaryButtonClick()
|
||
|
{
|
||
|
PrimaryButtonClick?.Invoke(this, ContentDialogResult.Primary);
|
||
|
}
|
||
|
|
||
|
public virtual void OnSecondaryButtonClick()
|
||
|
{
|
||
|
SecondaryButtonClick?.Invoke(this, ContentDialogResult.Secondary);
|
||
|
}
|
||
|
|
||
|
public virtual void OnCloseButtonClick()
|
||
|
{
|
||
|
CloseButtonClick?.Invoke(this, ContentDialogResult.None);
|
||
|
}
|
||
|
}
|