本文介绍了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);
我收到此错误Error1The name ''VistaControls'' does not exist in the current contextZ:\areo\areo\MainWindow.xaml.cs382areo
我想知道是否遗漏了什么,该表格的外观看起来像是玻璃areo
I get this errorError1The name ''VistaControls'' does not exist in the current contextZ:\areo\areo\MainWindow.xaml.cs382areo
And I was wondering if I missed something, the form is meant to look like glass areo
推荐答案
这篇关于WPF上的C#Areo玻璃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!