Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Windows WPF Shell DLL VB.NET , +
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>
 
But Im getting 2 errors says :
Error 1 The attachable property 'WindowChrome' was not found in type 'WindowChrome'.

 
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.

what should I do to fix it? I am trying to make a custom style with DWN effects without using other than xaml code.
Posted 16-Jan-13 20:02pm
Edited 16-Jan-13 20:04pm
v2
Comments
MuthukaruppanP at 27-Aug-13 16:26pm
   
Have a look at
http://blogs.msdn.com/b/wpfsdk/archive/2010/08/25/experiments-with-windowchrome.aspx

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 7,903
1 Sergey Alexandrovich Kryukov 7,192
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,820


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 27 Dec 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100