WPF上的C#Areo玻璃 [英] C# areo glass on WPF
本文介绍了WPF上的C#Areo玻璃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我在网上找到的代码
this is my code I found on the web
private void Window_Loaded(object sender, RoutedEventArgs e)
{
IntPtr hwnd = new WindowInteropHelper(this).Handle;
//Set backgroung to black
HwndSource source = HwndSource.FromHwnd(hwnd);
source.CompositionTarget.BackgroundColor = Color.FromArgb(0, 0, 0, 0);
//Set glass
VistaControls.DWM.DWMManager.EnableGlassSheet(hwnd);
}
这段代码的问题是
the problem with this code is
//Set glass
VistaControls.DWM.DWMManager.EnableGlassSheet(hwnd);
我收到此错误
Error 1 The name ''VistaControls'' does not exist in the current context Z:\areo\areo\MainWindow.xaml.cs 38 2 areo
我想知道是否遗漏了什么,该表格的外观看起来像是玻璃areo
I get this error
Error 1 The name ''VistaControls'' does not exist in the current context Z:\areo\areo\MainWindow.xaml.cs 38 2 areo
And I was wondering if I missed something, the form is meant to look like glass areo
推荐答案
检查项目中的页面或程序集引用.缺少某些内容或正确检查了页面名称.
Check you page or Assembly Reference in your project. There some thing is missing or Check the Name of page correctly.
这篇关于WPF上的C#Areo玻璃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文