/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v4.0.21
src/Files.App.Controls/GlobalHelper.cs
32 строки
804 B
0x5BFA
Code Quality: Added debug logs for Omnibar (#17231)
01 июл 2025, 17:07
Не верифицирован
01 июл 2025, 17:07
bd2f5f1
Код
Авторство
О чём код?
using Microsoft.UI.Input; using System.Reflection; namespace Files.App.Controls { public static class GlobalHelper { /// <summary> /// Sets cursor when hovering on a specific element. /// </summary> /// <param name="uiElement">An element to be changed.</param> /// <param name="cursor">Cursor to change.</param> public static void ChangeCursor(this UIElement uiElement, InputCursor cursor) { Type type = typeof(UIElement); type.InvokeMember( "ProtectedCursor", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.SetProperty | BindingFlags.Instance, null, uiElement, [cursor] ); } [Conditional("OMNIBAR_DEBUG")] public static void WriteDebugStringForOmnibar(string? message) { Debug.WriteLine($"OMNIBAR DEBUG: [{message}]"); } } }