当需要在WPF程序启动时,启动另一外部程序(.exe程序)时,可以按照下面的例子来: C#后台代码如下: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; u…
原文:在 WPF 程序中应用 Windows 10 真?亚克力效果 从 Windows 10 (1803) 开始,Win32 应用也可以有 API 来实现原生的亚克力效果了.不过相比于 UWP 来说,可定制性会差很多. 本文介绍如何在 WPF 程序中应用 Windows 10 真•亚克力效果.(而不是一些流行的项目里面自己绘制的亚克力效果.) 本文内容 API 如何使用 注意事项 API 需要使用的 API 是微软的文档中并未公开的 SetWindowCompositionAttribute.…
控件获取焦点除了用鼠标外,可以通过键盘来获取,比如Tab键或者方向键等,需要设置控件获取键盘焦点时的样式,可以通过设置FrameworkElemnt.FocusVisualStyle属性, 因为几乎所有常用的控件都继承了FrameworkElement,所以绝大部分控件都拥有该属性 // Summary: // Gets or sets a property that enables customization of appearance, effects, // or other style…