24 lines
604 B
C#
24 lines
604 B
C#
using Avalonia.Controls;
|
|
using Avalonia.Input;
|
|
using Avalonia.Xaml.Interactions.DragAndDrop;
|
|
using Photos.Models;
|
|
using Photos.ViewModels;
|
|
|
|
namespace Photos.Views;
|
|
|
|
public partial class MainWindow : Window
|
|
{
|
|
private IFolderPickerService _folderPickerService;
|
|
|
|
public MainWindow()
|
|
{
|
|
InitializeComponent();
|
|
_folderPickerService = new FolderPickerService(this);
|
|
DataContext = new MainWindowViewModel(_folderPickerService);
|
|
}
|
|
|
|
public void DropHandler(object sender, DragEventArgs e)
|
|
{
|
|
(DataContext as MainWindowViewModel)?.WindowDropHandler(e);
|
|
}
|
|
} |