随笔分类 - WPF
WPF C#
摘要:WPF刮刮乐 <Window x:Class="WpfApp2.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/wi
阅读全文
摘要:WPF里webview2会一直处于其他控件最上层,是个历史遗留问题。
为了能在webview2里鼠标移动让窗体跟着移动位置
阅读全文
摘要:wpf ScrollViewer 滚动动画
阅读全文
摘要:private const int WS_EX_TRANSPARENT = 0x20; private const int GWL_EXSTYLE = -20; /// <summary> /// window 扩展样式 分层显示 /// </summary> private const int W
阅读全文
摘要:例如将字体放入d:/Fonts 文件夹。然后就可以通过类似 btn.FontFamily = new FontFamily("file:///d:/Fonts/#Ashley");的形式使用。 获取字体文件的字体名称: string fontFilePath = "d:\\Fonts\\ygyxsz
阅读全文
摘要:void SuppressScriptErrors(WebBrowser webBrowser, bool hide) { webBrowser.Navigating += (s, e) => { var fiComWebBrowser = typeof(WebBrowser).GetField("
阅读全文
摘要:<Window x:Class="WpfApp1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/200
阅读全文
摘要:加个属性: btn.SetValue(Stylus.IsPressAndHoldEnabledProperty,false); 或者在样式里设置: <Style x:Key="MyButtonStyle" TargetType="{x:Type Button}"> <Setter Property=
阅读全文
摘要:using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Text; using System.Threadin
阅读全文
摘要:using the online website https://imagetosketch.com/ <Window x:Class="WpfMosaic.PhotoSketchWind" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/pr
阅读全文
摘要:假设文件大小一样就表示文件一模一样,是重复文件 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Syst
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System
阅读全文
摘要://随机多边形:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; usin
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; using System.Draw
阅读全文
摘要:<DataGrid > <DataGrid.CellStyle> <Style TargetType="DataGridCell"> <Style.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter Property="Bac
阅读全文
摘要:<Window x:Class="WpfApp1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/200
阅读全文
摘要:// <Window x:Class="WpfApp1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/
阅读全文