private void LoadFiles(object sender, MouseButtonEventArgs e) { if (RegisteredTypes?.Any != true) { throw new Exception("You must specify at least one supported file type."); } var dialog = new OpenFileDialog { Multiselect = true, Filter = RegisteredTypes.ToString() }; dialog.ShowDialog(); if (!dialog.FileNames.Any()) { return; } this.ProcessingFiles(true); var eventArgs = new DragAndDropEventArgs(this); SortData(dialog.FileNames, eventArgs); OnDataRecievedFromDropOperation(eventArgs); this.ProcessingFiles(eventArgs.WaitForAsync); }