需要帮助Microsoft.Windows.Shell [英] Need help with Microsoft.Windows.Shell
本文介绍了需要帮助Microsoft.Windows.Shell的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好我是WPF的新手,我已添加(Microsoft.Windows.Shell.dll)参考
并使用此代码:
Hello I'am new to WPF, I've added (Microsoft.Windows.Shell.dll) Reference
and used this code :
<Window x:Class="MyLibrary.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:shell="http://schemas.microsoft.com/winfx/2006/xaml/presentation/shell"
Title="MainWindow"
WindowStyle="SingleBorderWindow"
ResizeMode="CanResizeWithGrip"
mc:Ignorable="d"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="449"
d:DesignWidth="677"
Foreground="White">
<shell:WindowChrome.WindowChrome>
<shell:WindowChrome CaptionHeight="35"
GlassFrameThickness="0,0,0,1"
ResizeBorderThickness="5" />
</shell:WindowChrome.WindowChrome>
<Grid x:Name="LayoutRoot">
</Grid>
</Window>
但我得到2个错误说:
But Im getting 2 errors says :
Error 1 The attachable property 'WindowChrome' was not found in type 'WindowChrome'.<br />
第二个是:
And the Second is :
Error 2 The type 'shell:WindowChrome' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.<br />
我该怎么做才能修复它?我正在尝试使用DWN效果制作自定义样式而不使用除xaml代码之外的其他样式。
what should I do to fix it? I am trying to make a custom style with DWN effects without using other than xaml code.
推荐答案
我遇到了与您完全相同的错误。不明白为什么。
我做了以下修复工作:
- 关闭项目
- 删除了obj和bin文件夹
- 重新加载项目
- 将DLL放回bin文件夹
- 删除了引用并重新添加它。
- 关闭并重新打开使用DLL的表单。
希望它适合你也是!
B
I had the exact same errors as you. No idea why.
I did the following to fix it:
- closed the project
- deleted the obj and bin folders
- reloaded the project
- put the DLL back in the bin folder
- deleted the reference and re-added it.
- closed and reopened the forms that used the DLL.
Hope it works for you too!
B
这篇关于需要帮助Microsoft.Windows.Shell的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文