Click here to Skip to main content
12,953,175 members (47,232 online)
Rate this:
 
Please Sign up or sign in to vote.
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'.<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 />

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 19:02pm
Updated 16-Jan-13 19:04pm
v2
Comments
MuthukaruppanP 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
Top Experts
Last 24hrsThis month
OriginalGriff 6,429
CHill60 3,490
Maciej Los 3,103
Jochen Arndt 1,975
ppolymorphe 1,920


Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 27 Dec 2013
Copyright © CodeProject, 1999-2017
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