sourcegit/src/Views/StashesPage.axaml.cs

23 lines
585 B
C#
Raw Normal View History

using Avalonia.Controls;
namespace SourceGit.Views
{
public partial class StashesPage : UserControl
{
public StashesPage()
{
InitializeComponent();
}
2024-05-30 00:13:59 -07:00
private void OnStashContextRequested(object sender, ContextRequestedEventArgs e)
{
if (DataContext is ViewModels.StashesPage vm && sender is Border border)
{
var menu = vm.MakeContextMenu(border.DataContext as Models.Stash);
border.OpenContextMenu(menu);
}
e.Handled = true;
}
}
}