随笔分类 - 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
阅读全文
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
阅读全文
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
阅读全文
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
阅读全文
C# Avalonia 03 - LayoutPanels - SimpleInkCanvas
摘要:这次继承C# Avalonia官方自带的Canvas,扩展一个InkCanvas,兼容Canvas的所有功能。为了简化自定义命名控件,建议把自定义控件加入到默认空间。 AssemblyInfo.cs代码如下 using System.Runtime.CompilerServices; using S
阅读全文
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
阅读全文
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
阅读全文
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
阅读全文
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
阅读全文
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
阅读全文
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
阅读全文
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
阅读全文
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
阅读全文
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
阅读全文
C# Avalonia 03 - LayoutPanels
摘要:扩展中增加了获取当前主窗口的代码 public static Control Current(this Control topLevel) { var mainWindow = (Application.Current?.ApplicationLifetime as IClassicDesktopS
阅读全文
C# Avalonia动态加载xaml和cs实例
摘要:扩展请参考 https://www.cnblogs.com/dalgleish/p/18972924 NonCompiledXaml.axaml代码 <Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.micro
阅读全文
C# Avalonia 扩展 - 所有例子必备
摘要:Avalonia配置,参考https://www.cnblogs.com/dalgleish/p/18967204 随时更新,目前已支持多个cs文件动态编译。 AvaloniaExtensions.cs代码 using Avalonia; using Avalonia.Controls; using
阅读全文
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
阅读全文
C# Avalonia - 导航栏
摘要:项目结构 小技巧,修改AvaloniaUI.csproj,让下面代码替换所有ItemGroup。这样的好处是,以后Resources下建立的xaml,默认是AvaloniaResource,然后Resource\Xamls下的,是正常文件。 <ItemGroup> <AvaloniaResource
阅读全文
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
阅读全文