edit
This commit is contained in:
33
XLAB2/TpvdklWindow.xaml.cs
Normal file
33
XLAB2/TpvdklWindow.xaml.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace XLAB2
|
||||
{
|
||||
public partial class TpvdklWindow : Window
|
||||
{
|
||||
private readonly TpvdklWindowViewModel _viewModel;
|
||||
|
||||
internal TpvdklWindow(TipsDirectoryItem tipsItem, TypeSizeDirectoryService service)
|
||||
{
|
||||
InitializeComponent();
|
||||
_viewModel = new TpvdklWindowViewModel(tipsItem, service, new TypeSizeDialogService(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user