上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 23 下一页
  2025年6月27日
摘要: 我对TextBox的功能修改了下,动态更新显示和隐藏密码的图标。为了考验大家,各位自己去修改源代码。再次强调下,如果要把自定义控件加入到默认命名空间,一定要调用Shell扩展中的Navigate (源代码在https://www.cnblogs.com/dalgleish/p/18920441)。如 阅读全文
posted @ 2025-06-27 14:31 dalgleish 阅读(17) 评论(0) 推荐(0)
  2025年6月25日
摘要: 写过wpf的,都知道WrapPanel,这个在C# Maui里用FlexLayout实现。为了简化使用,我直接扩展了FlexLayout,增加了HorizontalSpacing和VerticalSpacing属性,这样就和toolkit:DockLayout中的间隔属性功能一样了。 大家可以重命名 阅读全文
posted @ 2025-06-25 14:07 dalgleish 阅读(26) 评论(0) 推荐(0)
  2025年6月24日
摘要: C# Maui暂时还没有TextBox,因为这个可以通过xaml样式实现,但是为了长期使用,自己写一个TextBox。 定义一个TextEventArgs public class TextEventArgs : EventArgs { public string Text{ get; set; } 阅读全文
posted @ 2025-06-24 14:36 dalgleish 阅读(180) 评论(0) 推荐(0)
  2025年6月22日
摘要: C# Maui的CheckBox暂时没有Label属性,继承Border扩展CheckBox。其次,为了简单,写一个PropertyManager,共用代码,这样以后换肤时,也可以动态修改对应属性。这里先实现一个CornerRadiusProperty的动态修改。 public class Prop 阅读全文
posted @ 2025-06-22 07:21 dalgleish 阅读(19) 评论(1) 推荐(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 阅读(13) 评论(0) 推荐(0)
  2025年6月20日
摘要: C# maui暂时没有官方支持InkCanvas,但是不影响,自己实现一个就行了。目前支持画图,选择,移动和删除。同时支持自定义橡皮擦形状,也支持绑定自定义的形状列表。 实现一个Converter类,以后所有的绑定类型转换都在这个类中实现。 using System; using System.Co 阅读全文
posted @ 2025-06-20 14:10 dalgleish 阅读(141) 评论(0) 推荐(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 阅读(17) 评论(0) 推荐(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 阅读(19) 评论(0) 推荐(0)
摘要: 因为C# Maui还没有把GridSplitter加入到正式支持,但是这个也不是很重要,自己实现一个就行了。继承Border可实现多种样式。 GridSplitter.cs代码 using Microsoft.Maui.Controls.Shapes; using System.Collection 阅读全文
posted @ 2025-06-16 13:43 dalgleish 阅读(26) 评论(0) 推荐(1)
摘要: 下面代码,我是放在Shares项目里的Utility文件夹里。 GridLine重写GraphicsView和IDrawable,自动适应大小。 using System; using System.Collections.Generic; using System.Linq; using Syst 阅读全文
posted @ 2025-06-16 07:07 dalgleish 阅读(15) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 23 下一页