随笔分类 -  C# Avalonia

教程
C# Avalonia 03 - LayoutPanels - ModularContent
摘要:ModularContent.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.mi 阅读全文
posted @ 2025-07-11 14:34 dalgleish 阅读(16) 评论(0) 推荐(0)
C# Avalonia 03 - LayoutPanels - LocalizableText
摘要:LocalizableText.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.m 阅读全文
posted @ 2025-07-11 14:09 dalgleish 阅读(15) 评论(0) 推荐(0)
C# Avalonia 03 - LayoutPanels - TextBoxColumn
摘要:TextBoxColumn.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.mic 阅读全文
posted @ 2025-07-11 13:57 dalgleish 阅读(12) 评论(0) 推荐(0)
C# Avalonia 03 - LayoutPanels - TheUniformGrid
摘要:TheUniformGrid.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.mi 阅读全文
posted @ 2025-07-11 13:50 dalgleish 阅读(19) 评论(0) 推荐(0)
C# Avalonia 03 - LayoutPanels - SimpleInkCanvas
摘要:这次继承C# Avalonia官方自带的Canvas,扩展一个InkCanvas,兼容Canvas的所有功能。为了简化自定义命名控件,建议把自定义控件加入到默认空间。 AssemblyInfo.cs代码如下 using System.Runtime.CompilerServices; using S 阅读全文
posted @ 2025-07-11 12:31 dalgleish 阅读(401) 评论(0) 推荐(0)
C# Avalonia 03 - LayoutPanels - SimpleCanvas
摘要:SimpleCanvas.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.micr 阅读全文
posted @ 2025-07-10 14:30 dalgleish 阅读(18) 评论(0) 推荐(0)
C# Avalonia 03 - LayoutPanels - SharedSizeGroup
摘要:SharedSizeGroup.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.m 阅读全文
posted @ 2025-07-10 14:25 dalgleish 阅读(16) 评论(0) 推荐(0)
C# Avalonia 03 - LayoutPanels - DoubleSplitWindow
摘要:DoubleSplitWindow.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas 阅读全文
posted @ 2025-07-10 14:18 dalgleish 阅读(16) 评论(0) 推荐(0)
C# Avalonia 03 - LayoutPanels - SplitWindow
摘要:SplitWindow.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.micro 阅读全文
posted @ 2025-07-10 14:13 dalgleish 阅读(10) 评论(0) 推荐(0)
C# Avalonia 03 - LayoutPanels - LayoutRoundingTest
摘要:LayoutRoundingTest.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schema 阅读全文
posted @ 2025-07-10 14:05 dalgleish 阅读(10) 评论(0) 推荐(0)
C# Avalonia 03 - LayoutPanels - SimpleGrid
摘要:SimpleGrid.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.micros 阅读全文
posted @ 2025-07-10 14:01 dalgleish 阅读(11) 评论(0) 推荐(0)
C# Avalonia 03 - LayoutPanels - BasicDialogBox
摘要:BasicDialogBox.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.mi 阅读全文
posted @ 2025-07-10 13:49 dalgleish 阅读(14) 评论(0) 推荐(0)
C# Avalonia 03 - LayoutPanels - SimpleDock
摘要:SimpleDock.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.micros 阅读全文
posted @ 2025-07-10 13:42 dalgleish 阅读(18) 评论(0) 推荐(0)
C# Avalonia 03 - LayoutPanels - SimpleWrap
摘要:SimpleWrap.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.micros 阅读全文
posted @ 2025-07-10 13:34 dalgleish 阅读(12) 评论(0) 推荐(0)
C# Avalonia 03 - LayoutPanels
摘要:扩展中增加了获取当前主窗口的代码 public static Control Current(this Control topLevel) { var mainWindow = (Application.Current?.ApplicationLifetime as IClassicDesktopS 阅读全文
posted @ 2025-07-10 13:16 dalgleish 阅读(29) 评论(0) 推荐(0)
C# Avalonia动态加载xaml和cs实例
摘要:扩展请参考 https://www.cnblogs.com/dalgleish/p/18972924 NonCompiledXaml.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.micro 阅读全文
posted @ 2025-07-09 13:32 dalgleish 阅读(514) 评论(0) 推荐(5)
C# Avalonia 扩展 - 所有例子必备
摘要:Avalonia配置,参考https://www.cnblogs.com/dalgleish/p/18967204 随时更新,目前已支持多个cs文件动态编译。 AvaloniaExtensions.cs代码 using Avalonia; using Avalonia.Controls; using 阅读全文
posted @ 2025-07-08 14:10 dalgleish 阅读(107) 评论(0) 推荐(0)
C# Avalonia 02 - EightBall
摘要:EightBall.axaml <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft 阅读全文
posted @ 2025-07-05 15:49 dalgleish 阅读(29) 评论(0) 推荐(0)
C# Avalonia - 导航栏
摘要:项目结构 小技巧,修改AvaloniaUI.csproj,让下面代码替换所有ItemGroup。这样的好处是,以后Resources下建立的xaml,默认是AvaloniaResource,然后Resource\Xamls下的,是正常文件。 <ItemGroup> <AvaloniaResource 阅读全文
posted @ 2025-07-05 15:18 dalgleish 阅读(105) 评论(0) 推荐(0)
C# Avalonia配置
摘要: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 阅读(188) 评论(0) 推荐(1)