/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Files.App/Dialogs/CompressSkippedItemsDialog.xaml.cs
39 строк
1 KB
yair100
Feature: Added prompt when there is issue compressing file (#18723)
16 июл 2026, 21:59
Не верифицирован
16 июл 2026, 21:59
b30f334
Код
Авторство
О чём код?
// Copyright (c) Files Community // SPDX-License-Identifier: MPL-2.0 using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; namespace Files.App.Dialogs { public sealed partial class CompressSkippedItemsDialog : ContentDialog, IDialog<CompressSkippedItemsDialogViewModel> { private FrameworkElement RootAppElement => (FrameworkElement)MainWindow.Instance.Content; public CompressSkippedItemsDialogViewModel ViewModel { get => (CompressSkippedItemsDialogViewModel)DataContext; set => DataContext = value; } public CompressSkippedItemsDialog() { InitializeComponent(); } public new async Task<DialogResult> ShowAsync() { return (DialogResult)await SetContentDialogRoot(this).TryShowAsync(); } // WINUI3 private static ContentDialog SetContentDialogRoot(ContentDialog contentDialog) { if (Windows.Foundation.Metadata.ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 8)) contentDialog.XamlRoot = MainWindow.Instance.Content.XamlRoot; return contentDialog; } } }