2025年6月22日
摘要:
C# Maui的CheckBox暂时没有Label属性,继承Border扩展CheckBox。其次,为了简单,写一个PropertyManager,共用代码,这样以后换肤时,也可以动态修改对应属性。这里先实现一个CornerRadiusProperty的动态修改。 public class Prop
阅读全文
posted @ 2025-06-22 07:21
dalgleish
阅读(26)
推荐(0)
2025年6月21日
摘要:
TextBoxColumn.xaml对应代码 <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://sche
阅读全文
posted @ 2025-06-21 15:34
dalgleish
阅读(16)
推荐(0)
2025年6月20日
摘要:
C# maui暂时没有官方支持InkCanvas,但是不影响,自己实现一个就行了。目前支持画图,选择,移动和删除。同时支持自定义橡皮擦形状,也支持绑定自定义的形状列表。 实现一个Converter类,以后所有的绑定类型转换都在这个类中实现。 using System; using System.Co
阅读全文
posted @ 2025-06-20 14:10
dalgleish
阅读(151)
推荐(1)
2025年6月16日
摘要:
过去,wpf都基于Canvas来定位,现在可以用AbsoluteLayout。 SimpleCanvas.xaml <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://schemas.microsoft.com/dot
阅读全文
posted @ 2025-06-16 14:30
dalgleish
阅读(24)
推荐(0)
摘要:
基于之前写GridSplitter,完善下另一个例子。 DoubleSplitWindow.xaml对应代码 <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://schemas.microsoft.com/dotnet
阅读全文
posted @ 2025-06-16 14:03
dalgleish
阅读(31)
推荐(0)
摘要:
因为C# Maui还没有把GridSplitter加入到正式支持,但是这个也不是很重要,自己实现一个就行了。继承Border可实现多种样式。 GridSplitter.cs代码 using Microsoft.Maui.Controls.Shapes; using System.Collection
阅读全文
posted @ 2025-06-16 13:43
dalgleish
阅读(39)
推荐(1)
摘要:
下面代码,我是放在Shares项目里的Utility文件夹里。 GridLine重写GraphicsView和IDrawable,自动适应大小。 using System; using System.Collections.Generic; using System.Linq; using Syst
阅读全文
posted @ 2025-06-16 07:07
dalgleish
阅读(19)
推荐(0)
2025年6月15日
摘要:
更新Shell扩展,新增弹窗功能。https://www.cnblogs.com/dalgleish/p/18920441 BasicDialogBox.xaml代码,简单一个按钮,用于弹出对话框。 <?xml version="1.0" encoding="utf-8" ?> <ContentPa
阅读全文
posted @ 2025-06-15 10:13
dalgleish
阅读(32)
推荐(0)
摘要:
之前已经说过,使用MauiCommunityToolkit包了。这里不再累述。 SimpleDock.xaml代码 <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://schemas.microsoft.com/dot
阅读全文
posted @ 2025-06-15 05:07
dalgleish
阅读(25)
推荐(0)
摘要:
SimpleWrap.xaml对应代码 <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas
阅读全文
posted @ 2025-06-15 01:08
dalgleish
阅读(11)
推荐(0)