/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Files.App/Dialogs/CreateShortcutDialog.xaml.cs
43 строки
1 KB
Yair
Code Quality: Ran code cleanup (#17307)
25 июл 2025, 03:57
Не верифицирован
25 июл 2025, 03:57
4558bc2
Код
Авторство
О чём код?
// Copyright (c) Files Community // Licensed under the MIT License. using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Data; namespace Files.App.Dialogs { public sealed partial class CreateShortcutDialog : ContentDialog, IDialog<CreateShortcutDialogViewModel> { private FrameworkElement RootAppElement => (FrameworkElement)MainWindow.Instance.Content; public CreateShortcutDialogViewModel ViewModel { get => (CreateShortcutDialogViewModel)DataContext; set => DataContext = value; } public CreateShortcutDialog() { InitializeComponent(); this.Closing += CreateShortcutDialog_Closing; InvalidPathWarning.SetBinding(TeachingTip.TargetProperty, new Binding() { Source = ShortcutTarget }); } private void CreateShortcutDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args) { this.Closing -= CreateShortcutDialog_Closing; InvalidPathWarning.IsOpen = false; } public new async Task<DialogResult> ShowAsync() { return (DialogResult)await base.ShowAsync(); } } }