摘要: C# avalonia没有内置判断属性是否绑定的代码,所以我们自己扩展实现一个。这个扩展可以用于动态解绑和绑定属性。基于我写的自定义扩展。 https://www.cnblogs.com/dalgleish/p/18972924 AvaloniaObjectExtensions代码 using Av 阅读全文
posted @ 2025-08-05 07:04 dalgleish 阅读(10) 评论(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 阅读(101) 评论(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 阅读(173) 评论(0) 推荐(1)
  2025年9月16日
摘要: 例子展现了两种设置动画的方法,各位自行选择。 CodeAnimation.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmln 阅读全文
posted @ 2025-09-16 11:51 dalgleish 阅读(1) 评论(0) 推荐(0)
摘要: GenerateBitmap.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.mi 阅读全文
posted @ 2025-09-16 09:14 dalgleish 阅读(2) 评论(0) 推荐(0)
  2025年9月15日
摘要: 目前Avalonia无法继承Effect类重写,因为构造函数是internal。我们重写一个GrayscaleImage实现灰化。 GrayscaleImage类 public class GrayscaleImage : Control { public static readonly Style 阅读全文
posted @ 2025-09-15 12:13 dalgleish 阅读(11) 评论(0) 推荐(0)
  2025年9月12日
摘要: DropShadowEffects.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas 阅读全文
posted @ 2025-09-12 10:55 dalgleish 阅读(4) 评论(0) 推荐(0)
摘要: BlurEffects.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.micro 阅读全文
posted @ 2025-09-12 10:52 dalgleish 阅读(0) 评论(0) 推荐(0)
  2025年9月11日
摘要: 扩展已经更新,新增对资源和样式的动态加载。 https://www.cnblogs.com/dalgleish/p/18972924 有了这个新增功能,我们就可以单独创建一个Styles.axaml。以后样式可以独立在这里书写,我这里写了一个RadioButton的样式。 <Styles xmlns 阅读全文
posted @ 2025-09-11 13:04 dalgleish 阅读(4) 评论(0) 推荐(0)
  2025年9月8日
摘要: Drawings.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsof 阅读全文
posted @ 2025-09-08 08:29 dalgleish 阅读(3) 评论(0) 推荐(0)
摘要: ClipArt.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft 阅读全文
posted @ 2025-09-08 07:44 dalgleish 阅读(1) 评论(0) 推荐(0)
摘要: ClippingWithViewbox.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schem 阅读全文
posted @ 2025-09-08 07:42 dalgleish 阅读(0) 评论(0) 推荐(0)
摘要: Clipping.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsof 阅读全文
posted @ 2025-09-08 07:40 dalgleish 阅读(2) 评论(0) 推荐(0)