Ejemplo n.º 1
0
        private async Task LoadFromFile(CancellationToken token)
        {
            using (BusyStack.GetToken())
            {
                var options = new FileSystemBrowserOptions()
                {
                    CanCancel      = true,
                    MultiSelection = false,
                    Title          = _translator.Translate(nameof(Resources.SelectFiles)),
                };

                (var Result, var MediaItems) = await _dialogViewModel.ShowMediaItemSelectionDialog(options, token).ConfigureAwait(true);

                if (Result)
                {
                    AddRange(MediaItems);
                }
            }
        }