会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
nap117
博客园
首页
新随笔
联系
订阅
管理
2026年10月22日
WPF 中常用的 LINQ 语句
摘要: WPF 中常用的 LINQ 语句 在 WPF 开发中,LINQ(Language Integrated Query)主要用于处理集合数据、实现动态过滤、排序,以及将非标准数据源(如 XML 或数据库查询结果)转换为 UI 可绑定的格式。本文汇总常用 LINQ 语句的含义对照表,并给出在 WPF /
阅读全文
posted @ 2026-10-22 09:45 nap117
阅读(228)
评论(1)
推荐(0)
2026年7月2日
GongSoluation-Wpf-DragDrop的使用
摘要: 命令空间 xmlns:dd="urn:gong-wpf-dragdrop" 控件属性设置 dd:DragDrop.CanDragWithMouseRightButton="False" dd:DragDrop.DropTargetAdornerBrush="LightGray" dd:DragDro
阅读全文
posted @ 2026-07-02 15:07 nap117
阅读(17)
评论(0)
推荐(0)
2026年5月27日
【WPF】颜色选择
摘要: 在按钮上鼠标右键,弹窗选择颜色: private void Btn_MouseRightButtonDown(object sender, MouseButtonEventArgs e) { Button btn = sender as Button; // 选择颜色 int channelNum
阅读全文
posted @ 2026-05-27 10:22 nap117
阅读(15)
评论(0)
推荐(0)
【WPF】在ListBox中添加按钮右键Popup
摘要: ListBox中放了一个按钮,想要在右键操作时弹出一个包含多个控件的Popup,实现如下: XAML: <ListBox x:Name="MyList" ItemsSource="{Binding MyCollection}" ItemContainerStyle="{StaticResource
阅读全文
posted @ 2026-05-27 09:58 nap117
阅读(17)
评论(0)
推荐(0)
2026年5月19日
【SciChart】部署到项目
摘要: 安装SciChart的SDK,里面包含SciChart WPF v5 Licensing Wizard; 在项目引用中添加SCIChart的SDK: 运行SciChart WPF v5 Licensing Wizard,添加Development license。 在项目App.xaml.cs的初始
阅读全文
posted @ 2026-05-19 10:59 nap117
阅读(33)
评论(0)
推荐(0)
2026年4月29日
WPF中数字显示格式
摘要: 科学计数法: <DataGridTextColumn Header="A" FontSize="10" Binding="{Binding CaliKey.Ka, StringFormat={}{0:E6}}" MinWidth="50"/> 浮点型小数位固定6位: <DataGridTextCol
阅读全文
posted @ 2026-04-29 14:44 nap117
阅读(18)
评论(0)
推荐(0)
2026年4月27日
OxyPlot图表使用
摘要: 1.添加OxyPlot库; 2.Xaml中添加引用; xmlns:oxy="clr-namespace:OxyPlot.Wpf;assembly=OxyPlot.Wpf" 3.Xaml中使用控件; <oxy:PlotView x:Name="MyPlotView"/> 4.隐藏代码中 初始化图表 v
阅读全文
posted @ 2026-04-27 17:03 nap117
阅读(107)
评论(0)
推荐(0)
2026年4月14日
C# WPF查找父控件&查找子控件
摘要: // Button btn = sender as Button; CalibrationKey samplePointXY = btn.DataContext as CalibrationKey; //DataGridRow row = FindVisualParent(btn); DataGri
阅读全文
posted @ 2026-04-14 17:48 nap117
阅读(22)
评论(0)
推荐(0)
C#访问modbus设备
摘要: ModbusSerialMaster modbusSerialMaster = null; SerialPort serialPort = null; string portName = _ViewModel.SerialPortName; // 替换为你的串口号 int baudRate = _V
阅读全文
posted @ 2026-04-14 16:23 nap117
阅读(29)
评论(0)
推荐(0)
2026年3月30日
STM32烧写程序
摘要: 打开程序; 打开Hex程序文件:File--》Open File…… 开始烧写:Target-》Program
阅读全文
posted @ 2026-03-30 08:49 nap117
阅读(13)
评论(0)
推荐(0)
公告