随笔分类 - .NET
摘要:避免使用WindowChrome.WindowChrome 可能会导致窗口全屏时无法完全遮挡底部窗口 避免使用窗口透明,可能会导致webview、视频组件无法显示 注意检测https证书问题,可以查看win7根证书问题相关解决方法
阅读全文
摘要:新增一个自定义控件继承ComboBox,同事在输入事件之前打开下拉框 public partial class ComboBoxEx : ComboBox { public ComboBoxEx() { } private int caretPosition; public override voi
阅读全文
摘要:安装证书即可, https://www.microsoft.com/pkiops/Docs/Repository.htm
阅读全文
摘要:需要根据实际需求在按钮的对应事件或者Command中添加逻辑 <Style TargetType="ComboBox" x:Key="DeleteComboBoxStyle"> <Setter Property="ItemContainerStyle"> <Setter.Value> <!--Com
阅读全文
摘要:viewmodel中定义原始数据及筛选后的数据,筛选后的数据类型为ICollectionView //原始数据列表 public ObservableCollection<SchoolOutDto> SchoolList { get; set; } /// <summary> /// 筛选数据后的列
阅读全文
摘要:除了常规的设置 WindowState="Maximized" WindowStyle="None" ResizeMode="NoResize" 以外需要手动激活一下窗口 if (this.IsVisible) { //避免影响popup显示 //this.Hide(); //this.Show()
阅读全文
摘要:下载固定版本的包,使用解压缩工具解压缩 https://developer.microsoft.com/zh-cn/microsoft-edge/webview2/?form=MA13LH#download-section wpf中加载这个目录 Webview2_129为测试的目录 var envP
阅读全文
摘要:legacy IBM formatted bits like EBCDIC, big endian and floating point using (var stream = File.OpenWrite("punchcard.bin")) using (var writer = new Bina
阅读全文
摘要:https://stackoverflow.com/questions/20363100/wpf-popup-location-issue HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows REG_SZ: M
阅读全文
摘要:/// <summary> /// Use this Classes static methods to initialize and inject touch input. /// </summary> public class NativeMethods { /// <summary> ///
阅读全文
摘要:添加一个支持多点触摸的画布 /// <summary> /// 支持多点触摸的InkCanvas /// </summary public class MultiTouchCanvas : FrameworkElement { private InkCanvasProxy _inkCanvas =
阅读全文
摘要:动态绑定触摸事件 btnChangeErase.AddHandler(TouchDownEvent, new RoutedEventHandler(btnChangeErase_TouchDown), true); btnChangeErase.AddHandler(TouchUpEvent, ne
阅读全文
摘要:安装nuget SharpZipLib 1.4.2 public class ZipHelper { /// <summary> /// 压缩文件/文件夹 /// </summary> /// <param name="filePath">需要压缩的文件/文件夹路径</param> /// <par
阅读全文
摘要:检测屏幕分辨率变化后自动调整viewbox内部容器大小 - 动态适配屏幕分辨率 <Window SizeChanged="Window_SizeChanged"> <Viewbox x:Name="mainViewbox" Stretch="Uniform" StretchDirection="Bo
阅读全文
摘要:btnChangeErase.AddHandler(Button.MouseLeftButtonUpEvent, new MouseButtonEventHandler(this.btnChangeErase_MouseUp), true); [参考] 1 2
阅读全文
摘要:public class CountValidationRule : ValidationRule { public override ValidationResult Validate(object value, System.Globalization.CultureInfo cultureIn
阅读全文
摘要:安装nuget 【GMap.NET.Core】、【GMap.NET.WinPresentation】 AMapProviderBase public abstract class AMapProviderBase : GMapProvider { public AMapProviderBase()
阅读全文
摘要:需要安装nuget包【svg】 public class SVGHelper { /// <summary> /// 保持svg为图片 /// </summary> /// <param name="path"></param> /// <param name="imgPath"></param>
阅读全文
摘要:zxing 安装nuget包【ZXing.Net】 /// <summary> /// 图片转换 /// </summary> /// <param name="image"></param> /// <returns></returns> LuminanceSource CreateLuminan
阅读全文
摘要:转图片可以直接使用,需要注意传递宽高,也可以转svg再转图片(可能会在不同电脑上效果不同,建议是使用图片直接转) slide.GetThumbnail(new System.Drawing.Size((int)windowWidth, (int)windowHeight)).Save($"slide
阅读全文