摘要:
C# avalonia沒有內置判斷屬性是否綁定的代碼,所以我們自己擴展實現一個。這個擴展可以用于動態解綁和綁定屬性。基于我寫的自定義擴展。 http://www.rzrgm.cn/dalgleish/p/18972924 AvaloniaObjectExtensions代碼 using Av
閱讀全文
posted @ 2025-08-05 07:04
dalgleish
閱讀(22)
推薦(0)
摘要:
Avalonia配置,參考http://www.rzrgm.cn/dalgleish/p/18967204 隨時更新,目前已支持多個cs文件動態編譯。 AvaloniaExtensions.cs代碼 using Avalonia; using Avalonia.Controls; using
閱讀全文
posted @ 2025-07-08 14:10
dalgleish
閱讀(136)
推薦(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
閱讀(277)
推薦(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
閱讀(2)
推薦(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
閱讀(3)
推薦(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
閱讀(5)
推薦(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)
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)
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)
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
閱讀(5)
推薦(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)
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)
2025年10月20日
摘要:
結合我們之前寫的AnimationPlayer,現在實現一個小游戲。 定義自己的Style,前面有例子已經說明了如何在自己的Styles.axaml中寫Style。 <!-- Bomb 樣式 --> <Style Selector="ContentControl.Bomb"> <Setter Pro
閱讀全文
posted @ 2025-10-20 13:49
dalgleish
閱讀(42)
推薦(0)