/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Files.App/UserControls/KeyboardShortcut/KeyboardShortcutItemStyleSelector.cs
33 строки
902 B
Steve
Code Quality: Upgrade dependencies (#16741)
09 фев 2025, 05:02
Не верифицирован
09 фев 2025, 05:02
273c947
Код
Авторство
О чём код?
// Copyright (c) 2023 Files Community // Licensed under the MIT License. using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; namespace Files.App.UserControls.KeyboardShortcut { public partial class KeyboardShortcutItemStyleSelector : StyleSelector { public Style OutlinedItemStyle { get; set; } = null!; public Style FilledItemStyle { get; set; } = null!; public Style TextOnlyItemStyle { get; set; } = null!; protected override Style SelectStyleCore(object item, DependencyObject container) { if (container is KeyboardShortcutItem keyboardShortcutItem) { return keyboardShortcutItem.ItemType switch { KeyboardShortcutItemKind.Outlined => OutlinedItemStyle, KeyboardShortcutItemKind.Filled => FilledItemStyle, KeyboardShortcutItemKind.TextOnly => TextOnlyItemStyle, _ => OutlinedItemStyle, }; } return OutlinedItemStyle; } } }