WPF Shell Integration Library

One of the common complaints I have heard is that it is difficult to have a glass chrome like windows. Yeah, you could set the style to None, but then you would need to have code handling window behaviors like resize, close.... No more.. two of our devs (Adam Smith\Joe Castro) have written the WPF Shell integration library which allows you to do this very easily.. You can get the code\binaries from this link  

"The custom chrome feature allows applications control over the outer frame of the window so that WPF content can be drawn over the title bar. This allows applications to integrate with Aero glass to emulate the Office 2007/2010 look and feel, or to completely replace the frame with its own content without having to manage all the system behaviors that get lost when using WindowStyle.None"  

 

Code usage looks something like the below

<Style TargetType="{x:Type local:SelectableChromeWindow}">

    <Setter Property="shell:WindowChrome.WindowChrome">

        <Setter.Value>

            <shell:WindowChrome GlassFrameThickness="-1" />

        </Setter.Value>

    </Setter>

    <Setter Property="Template">

        <Setter.Value>

            <ControlTemplate TargetType="{x:Type local:SelectableChromeWindow}">

                <Grid>

                    <ContentPresenter Margin="40" Content="{TemplateBinding Content}"/>

                    <Button shell:WindowChrome.IsHitTestVisibleInChrome="True" Background="Transparent" ...

 

Code for the above sample is attached. Please note that the shell dll is not included. You will need to download the binary from the msdn site.

Share this post

 

WindowChromeSample.zip