2025年7月21日
摘要:
App.axaml配置 <Application xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="AvaloniaUI.App" Request
阅读全文
posted @ 2025-07-21 02:33
dalgleish
阅读(27)
推荐(0)
2025年7月20日
摘要:
DragAndDrop.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.micro
阅读全文
posted @ 2025-07-20 16:53
dalgleish
阅读(69)
推荐(0)
摘要:
继续扩展Input类 (https://www.cnblogs.com/dalgleish/p/18992754),增加IPointer私有变量,用作Capture功能的实现。 private static IPointer? pointer; private static void OnRawEv
阅读全文
posted @ 2025-07-20 13:04
dalgleish
阅读(21)
推荐(0)
2025年7月19日
摘要:
Focus.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.c
阅读全文
posted @ 2025-07-19 12:48
dalgleish
阅读(31)
推荐(0)
摘要:
实现类似WPF的KeyBoard,命名为Input类。 代码如下 using Avalonia; using Avalonia.Controls; using Avalonia.Input; using Avalonia.Input.Raw; using Avalonia.Interactivity
阅读全文
posted @ 2025-07-19 12:43
dalgleish
阅读(68)
推荐(0)
2025年7月14日
摘要:
Avalonia最新版本,默认拦截了TextInputEvent事件,所以无法通过xaml来定义。 OnlyNumbers.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.
阅读全文
posted @ 2025-07-14 11:13
dalgleish
阅读(18)
推荐(0)
摘要:
增加了防止重复按键功能。 KeyPressEvents.axml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http:
阅读全文
posted @ 2025-07-14 07:57
dalgleish
阅读(29)
推荐(0)
2025年7月13日
摘要:
拦截鼠标松开事件 ButtonMouseUpEvent.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http
阅读全文
posted @ 2025-07-13 11:24
dalgleish
阅读(33)
推荐(0)
摘要:
隧道事件。目前Avalonia在跨平台上,支持差点,但是Windows下拦截消息还是可以。默认是冒泡事件。 TunneledKeyPress.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.m
阅读全文
posted @ 2025-07-13 10:09
dalgleish
阅读(22)
推荐(0)
摘要:
冒泡事件 RoutedEventArgs扩展 //RoutedEventArgs扩展 public static object? OriginalSource(this RoutedEventArgs e) { return (Application.Current?.ApplicationLife
阅读全文
posted @ 2025-07-13 08:30
dalgleish
阅读(38)
推荐(0)