How do I hide the shadow that appears at the top of a DocumentViewer element

35 Views Asked by At

I'm putting together a basic word processor layout in WPF. I have a DockPanel that holds a TextBlock placeholder aligned top, and then another nested DockPanel which contains a top, left and bottom 'panel' (just a TextBlock placeholder at this stage), with a DocumentViewer in the centre (which itself contains a FixedDocument).

layout

What I don't understand is why is there a shadow at the top of the DocumentViewer element, and how do I get rid of it?

I've actually wondered whether perhaps it's a shadow being cast by the ToolBar? I've disabled the ToolBar using:

<DocumentViewer.Resources>
    <Style TargetType="ToolBar">
        <Setter Property="Visibility" Value="Collapsed"/>
    </Style>
    <Style TargetType="ContentControl">
        <Setter Property="Visibility" Value="Collapsed" />
    </Style>
</DocumentViewer.Resources>

But does the shadow live on, do I need to maybe disable that somehow? Or is it the DocumentViewer?

Thanks.

0

There are 0 best solutions below