摘要: C# avalonia没有内置判断属性是否绑定的代码,所以我们自己扩展实现一个。这个扩展可以用于动态解绑和绑定属性。基于我写的自定义扩展。 https://www.cnblogs.com/dalgleish/p/18972924 AvaloniaObjectExtensions代码 using Av 阅读全文
posted @ 2025-08-05 07:04 dalgleish 阅读(20) 评论(0) 推荐(0)
 
摘要: Avalonia配置,参考https://www.cnblogs.com/dalgleish/p/18967204 随时更新,目前已支持多个cs文件动态编译。 AvaloniaExtensions.cs代码 using Avalonia; using Avalonia.Controls; using 阅读全文
posted @ 2025-07-08 14:10 dalgleish 阅读(134) 评论(0) 推荐(0)
 
摘要: 1. 安装VS 2022 2. 打开x64 Native Tools Command Prompt for VS 2022,输入下面指令获取Avalonia模板 dotnet new install Avalonia.Templates 3. 在扩展中搜索“Avalonia for Visual S 阅读全文
posted @ 2025-07-05 14:17 dalgleish 阅读(268) 评论(0) 推荐(1)
  2025年11月2日
摘要: MultiPartTemplates.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schema 阅读全文
posted @ 2025-11-02 04:49 dalgleish 阅读(1) 评论(0) 推荐(0)
  2025年11月1日
摘要: ButtonTemplate.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.mi 阅读全文
posted @ 2025-11-01 09:47 dalgleish 阅读(1) 评论(0) 推荐(0)
  2025年10月31日
摘要: GradientButtonTest.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schema 阅读全文
posted @ 2025-10-31 09:18 dalgleish 阅读(4) 评论(0) 推荐(0)
  2025年10月29日
摘要: SimpleCustomButton.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schema 阅读全文
posted @ 2025-10-29 12:25 dalgleish 阅读(8) 评论(0) 推荐(0)
  2025年10月24日
摘要: ControlTemplateBrowser.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://sc 阅读全文
posted @ 2025-10-24 14:59 dalgleish 阅读(5) 评论(0) 推荐(0)
  2025年10月23日
摘要: 实现粒子效果,继承Decorator。 SonicEffect.cs using Avalonia; using Avalonia.Controls; using Avalonia.Input; using Avalonia.Interactivity; using Avalonia.Media; 阅读全文
posted @ 2025-10-23 11:27 dalgleish 阅读(5) 评论(0) 推荐(0)
  2025年10月22日
摘要: ReusableFollowExample.axaml代码 <UserControl xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http: 阅读全文
posted @ 2025-10-22 09:43 dalgleish 阅读(4) 评论(0) 推荐(0)
摘要: FollowExample.axaml代码 <UserControl xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schema 阅读全文
posted @ 2025-10-22 06:14 dalgleish 阅读(6) 评论(0) 推荐(0)
  2025年10月21日
摘要: SampleViewer.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.micr 阅读全文
posted @ 2025-10-21 09:02 dalgleish 阅读(8) 评论(0) 推荐(0)
  2025年10月20日
摘要: 结合我们之前写的AnimationPlayer,现在实现一个小游戏。 定义自己的Style,前面有例子已经说明了如何在自己的Styles.axaml中写Style。 <!-- Bomb 样式 --> <Style Selector="ContentControl.Bomb"> <Setter Pro 阅读全文
posted @ 2025-10-20 13:49 dalgleish 阅读(42) 评论(0) 推荐(0)