摘要: 效果图: Xaml文件: <DockPanel Margin="10"> <WrapPanel DockPanel.Dock="Top" Margin="10"> <DockPanel Margin="6"> <TextBlock VerticalAlignment="Center">滚动条样式:< 阅读全文
posted @ 2021-03-17 12:14 孤独成派 阅读(454) 评论(0) 推荐(0) 编辑
摘要: 效果图: 鼠标拖动选择ListBoxItem的单独演示: 使用方式:修改ListBox模板,使用自定义面板ListBoxDragSelectViewer替代ScrollViewer;ListBoxDragSelectViewer里面封装了ScrollViewer; <ControlTemplate 阅读全文
posted @ 2021-01-19 17:48 孤独成派 阅读(649) 评论(0) 推荐(1) 编辑
摘要: 效果图: 效果图代码: <pp:CornerClip xmlns:pp="https://www.cnblogs.com/pumbaa" Margin="6" CornerRadius="20"> <Rectangle Fill="{DynamicResource PP.Brushes.Themes 阅读全文
posted @ 2021-01-19 17:09 孤独成派 阅读(1935) 评论(2) 推荐(2) 编辑
摘要: 控件已封装在自己写的控件库:https://github.com/LowPlayer/PP.Wpf RunningText:滚动文字,支持一下属性: Text:显示的文本; Space:首尾间距,负值或NaN时,首尾间距为整个容器宽度; Speed:滚动速度; Direction:滚动方向,支持四个 阅读全文
posted @ 2021-01-19 16:52 孤独成派 阅读(3638) 评论(11) 推荐(3) 编辑
摘要: 官方文档:https://docs.microsoft.com/zh-cn/windows/win32/directshow/directshow 创建CLR类库项目(CSharpDirectShow),编写托管的DirectShow类库,右键项目属性-->链接器--> 输入-->附加依赖项;添加静 阅读全文
posted @ 2021-01-09 17:56 孤独成派 阅读(724) 评论(0) 推荐(0) 编辑
摘要: 添加Nuget引用:Accord.Video.FFMPEG、Accord.Video.DirectShow; 发现电脑的视频采集设备,及获取视频采集设备的采集参数: /// <summary> /// 枚举视频设备 /// </summary> /// <returns></returns> pub 阅读全文
posted @ 2021-01-08 18:04 孤独成派 阅读(2587) 评论(2) 推荐(2) 编辑
摘要: 使用第三方开源库iText7.pdfHtml,将html和css转成pdf,官方:https://itextpdf.com/en/demos/convert-html-css-to-pdf-free-online; 官方示例: using System.IO; using iText.Html2pd 阅读全文
posted @ 2020-12-17 16:40 孤独成派 阅读(1650) 评论(0) 推荐(1) 编辑
摘要: 佳能数码单反相机是众多相机SDK里面最难对接的一个,应该说数码相机要比普通工业相机难对接,因为工业相机仅仅只是采集图像,而数码单反相机SDK意味着操作一部相机,有时我们需要像普通相机一样使用数码单反相机,本文就是实现这样的需求,需要实现的功能包括: 1、打开和关闭相机 2、实时显示图像 3、拍照和录 阅读全文
posted @ 2020-11-13 16:18 孤独成派 阅读(1879) 评论(0) 推荐(1) 编辑
摘要: 分享一个常用类型转换器,类名是GenericTypeConverter,一开始并不是我写的,但是经过长时间的磨合,变得更加完善和简洁了; 下面给出几个使用示例: Visibility="{Binding Converter={StaticResource genericTypeConverter}, 阅读全文
posted @ 2020-09-25 17:12 孤独成派 阅读(265) 评论(0) 推荐(2) 编辑
摘要: wpf使用设备无关单位,一开始的理解是无论DPI怎么变,显示的窗口大小是一样的,实际效果窗口会随着系统DPI缩放(哪里错了?请大佬明示);wpf设备无关单位转换成物理单位是与DPI无关的,下面给出一个Dpi结构: public struct Dpi { public Dpi (Double x, D 阅读全文
posted @ 2020-09-25 11:01 孤独成派 阅读(1761) 评论(0) 推荐(0) 编辑