编写界面控件,元素由 Grid 和一些控件组成,其中使用了 Expander 以便可以扩展面板内容。 <Grid> <Grid MinWidth="100" Height="50" VerticalAlignment="Top"[......]继续阅读

2024年2月6日 0条评论 3447点热度 3人点赞 痴者工良 阅读全文

The interface control is composed of a Grid and several controls, using an Expander to allow panel content to be expanded. <Grid> &[......]继续阅读

2024年2月6日 0条评论 58点热度 3人点赞 痴者工良 阅读全文

MainWindow 窗口使用 Blazor WebView2: <Border Margin="0,0,0,0" Background="Transparent" BorderThickness="0"[......]继续阅读

2023年11月22日 0条评论 2543点热度 0人点赞 痴者工良 阅读全文

MainWindow window using Blazor WebView2: <Border Margin="0,0,0,0" Background="Transparent"[......]继续阅读

2023年11月22日 0条评论 78点热度 0人点赞 痴者工良 阅读全文

先引入 PInvoke.net 或 Microsoft.Windows.CsWin32,请参考: https://www.whuanle.cn/archives/21436 定义两个获取屏幕去掉任务栏的长宽高函数: public static int GetSystemMetrics[......]继续阅读

2023年11月22日 0条评论 1715点热度 0人点赞 痴者工良 阅读全文

First, introduce PInvoke.net or Microsoft.Windows.CsWin32, refer to: https://www.whuanle.cn/archives/21436 Define two functions to get the screen dime[......] 继续阅读

2023年11月22日 0条评论 48点热度 0人点赞 痴者工良 阅读全文

包 CommunityToolkit.Mvvm 主要用于代码生成,能够为用户减少编写大量的代码,在 WPF 中可以实现 MVVM 设计模式,降低代码复杂度。 引入项目包: <PackageReference Include="CommunityToolkit.Mvvm" Versio[......]继续阅读

2023年11月2日 0条评论 3248点热度 2人点赞 痴者工良 阅读全文

The CommunityToolkit.Mvvm package is mainly used for code generation, which helps reduce the amount of code users need to write. It facilitates the im[......] 继续阅读

2023年11月2日 0条评论 56点热度 2人点赞 痴者工良 阅读全文

默认 webview2 使用英文语言显示,包括控制台、打印台等地方,都是英文提示,因此可以修改为本地语言。 public static void SetWebviewLanguage(string language = "zh-CN") { v[......]继续阅读

2023年9月14日 0条评论 2060点热度 0人点赞 痴者工良 阅读全文

By default, WebView2 displays in English, including in places like the console and print interface. However, it can be modified to use the local langu[......] 继续阅读

2023年9月14日 0条评论 48点热度 0人点赞 痴者工良 阅读全文

默认 Webview2 会被安装到系统目录,可能会导致程序启动时权限不足,无法使用 Webview2,以及多版本程序之间发生存储目录冲突。 因此需要自定义设置 Webview2 目录,最好就存储在程序安装目录下。 首先修改 App.xaml 文件,添加一行: <Application.[......]继续阅读

2023年9月14日 0条评论 2563点热度 0人点赞 痴者工良 阅读全文

Default WebView2 will be installed in the system directory, which may lead to insufficient permissions when the program starts, preventing the use of[......] 继续阅读

2023年9月14日 0条评论 44点热度 0人点赞 痴者工良 阅读全文