Files
XLAB/XLAB/FrpdDirectoryWindow.xaml.cs
Курнат Андрей 70b704b964 edit
2026-03-14 22:27:20 +03:00

34 lines
924 B
C#

using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
namespace XLAB
{
public partial class FrpdDirectoryWindow : Window
{
private readonly FrpdDirectoryWindowViewModel _viewModel;
public FrpdDirectoryWindow()
{
InitializeComponent();
_viewModel = new FrpdDirectoryWindowViewModel(new FrpdDirectoryService(), new FrpdDirectoryDialogService(this));
DataContext = _viewModel;
}
private void DataGridRow_PreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e)
{
var row = sender as DataGridRow;
if (row != null)
{
row.IsSelected = true;
row.Focus();
}
}
private async void Window_Loaded(object sender, RoutedEventArgs e)
{
await _viewModel.InitializeAsync();
}
}
}