Files
ClawdDotNet/src/ClawdDotNet.Desktop/Views/AddAgentWindow.axaml.cs
T

22 lines
452 B
C#

using Avalonia.Controls;
using ClawdDotNet.Desktop.ViewModels;
namespace ClawdDotNet.Desktop.Views;
public partial class AddAgentWindow : Window
{
public AddAgentWindow()
{
InitializeComponent();
}
protected override void OnDataContextChanged(EventArgs e)
{
base.OnDataContextChanged(e);
if (DataContext is AddAgentViewModel vm)
{
vm.CloseRequested += () => Close();
}
}
}