/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Files.App/UserControls/KeyboardShortcut/KeyboardShortcutItem.Properties.cs
64 строки
2 KB
Yair
Code Quality: Ran code cleanup (#17307)
25 июл 2025, 03:57
Не верифицирован
25 июл 2025, 03:57
4558bc2
Код
Авторство
О чём код?
// Copyright (c) 2023 Files Community // Licensed under the MIT License. using Microsoft.UI.Xaml; namespace Files.App.UserControls.KeyboardShortcut { public sealed partial class KeyboardShortcutItem { public static readonly DependencyProperty ItemTypeProperty = DependencyProperty.Register( nameof(ItemType), typeof(KeyboardShortcutItemKind), typeof(KeyboardShortcutItem), new PropertyMetadata(defaultValue: KeyboardShortcutItemKind.Outlined, (d, e) => ((KeyboardShortcutItem)d).OnItemTypePropertyChanged())); public KeyboardShortcutItemKind ItemType { get => (KeyboardShortcutItemKind)GetValue(ItemTypeProperty); set => SetValue(ItemTypeProperty, value); } public static readonly DependencyProperty SizeProperty = DependencyProperty.Register( nameof(Size), typeof(KeyboardShortcutItemSize), typeof(KeyboardShortcutItem), new PropertyMetadata(defaultValue: KeyboardShortcutItemSize.Small, (d, e) => ((KeyboardShortcutItem)d).OnSizePropertyChanged())); public KeyboardShortcutItemSize Size { get => (KeyboardShortcutItemSize)GetValue(SizeProperty); set => SetValue(SizeProperty, value); } public static readonly DependencyProperty TextProperty = DependencyProperty.Register( nameof(Text), typeof(string), typeof(KeyboardShortcutItem), new PropertyMetadata(defaultValue: string.Empty, (d, e) => ((KeyboardShortcutItem)d).OnTextPropertyChanged())); public string Text { get => (string)GetValue(TextProperty); set => SetValue(TextProperty, value); } public void OnItemTypePropertyChanged() { OnItemTypeChanged(); } public void OnSizePropertyChanged() { OnSizeChanged(); } public void OnTextPropertyChanged() { OnTextChanged(); } } }