X3

RedSky

导航

上一页 1 2 3 4 5 6 ··· 9 下一页

2024年6月20日 #

WPF支持任意快捷键+鼠标组合的绑定类

摘要: WPF支持任意快捷键+鼠标组合的绑定类 public interface IInputSignal { bool IsMatch(InputEventArgs args); } public class KeyDownSignal : KeySignal { public KeyDownSignal(Key key) : base(key 阅读全文

posted @ 2024-06-20 16:34 HotSky 阅读(28) 评论(0) 推荐(0)

2024年6月11日 #

WPF阻止窗体被系统缩放,使用显示器DPI

摘要: WPF默认是跟随系统DPI变化(缩放与布局)而缩放窗体的; 微软把它称为默认DPI感知,当DPI发生变化时WPF感知到后缩放窗体,介绍链接:设置进程的默认 DPI 感知 (Windows) - Win32 apps | Microsoft Learn 如果我们不希望窗体被缩放,而是让窗体使用显示器D 阅读全文

posted @ 2024-06-11 15:32 HotSky 阅读(517) 评论(0) 推荐(1)

2024年6月3日 #

WPF DataGrid自动增长序号列

摘要: /// <summary> /// 自动增长序号列 /// </summary> public class DataGridRowIndexColumn : DataGridTextColumn { /// <summary> /// 可以指定开始序号 /// </summary> public i 阅读全文

posted @ 2024-06-03 16:09 HotSky 阅读(241) 评论(0) 推荐(0)

2024年5月27日 #

C#访问或修改私有类、函数、变量、属性

摘要: .NET: public static class TypeUtil { public static Type? GetType(string assemblyName, string typePath) { var assembly = Assembly.Load(assemblyName); i 阅读全文

posted @ 2024-05-27 10:57 HotSky 阅读(198) 评论(1) 推荐(0)

2024年5月25日 #

WPF一个简单的属性编辑控件

摘要: 代码: public class PropertiesControl : Grid { [TypeConverter(typeof(LengthConverter))] public double RowHeight { get { return (double)GetValue(RowHeight 阅读全文

posted @ 2024-05-25 18:00 HotSky 阅读(80) 评论(0) 推荐(0)

2024年2月20日 #

C#Sqlite插入/更新并返回数据

摘要: 关键词:returning 返回所有列:returning *; 返回指定列:returning columnname; 删除命令不支持returning 参考代码: string path = @"Data Source=D:\Data\data.sqlite;Version=3"; using 阅读全文

posted @ 2024-02-20 15:32 HotSky 阅读(311) 评论(0) 推荐(0)

2023年12月5日 #

C#矩形分割矩形,使用任意个矩形来占据一个大的矩形,并求得未占用区域的所有不重叠矩形块

摘要: public enum TanglecySide { None = 1, LeftToRight = 1 >> 1, RightToLeft = 1 >> 2, TopBottom = 1 >> 3, BottomToTop = 1 >> 4, LeftToLeft = 1 >> 5, RightT 阅读全文

posted @ 2023-12-05 15:00 HotSky 阅读(56) 评论(0) 推荐(0)

2023年11月11日 #

WPF win10窗体背景模糊

摘要: internal enum AccentState { ACCENT_DISABLED = 0, ACCENT_ENABLE_GRADIENT = 1, ACCENT_ENABLE_TRANSPARENTGRADIENT = 2, ACCENT_ENABLE_BLURBEHIND = 3, ACCE 阅读全文

posted @ 2023-11-11 10:02 HotSky 阅读(100) 评论(0) 推荐(0)

2023年11月7日 #

WPF仿VS TreeView

摘要: [TemplatePart(Name = "PART_Content", Type = typeof(ToggleButton))] [TemplatePart(Name = "Expander", Type = typeof(Panel))] public class OTreeViewItem 阅读全文

posted @ 2023-11-07 17:15 HotSky 阅读(44) 评论(0) 推荐(0)

2023年10月16日 #

C# ConditionalWeakTable扩展属性通用类

摘要: 代码: public class AttachedProperty { static AttachedProperty? instance = null; static object instanceLock = new object(); public static AttachedPropert 阅读全文

posted @ 2023-10-16 18:03 HotSky 阅读(49) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 ··· 9 下一页