Background:
Im working on a WPF application that uses the Docking and SyntaxEditor controls. I'm seeing an odd behavior where, when I add a SyntaxEditor within a document tab, the syntax editor has a 5 pixel border between it and the document tab's edges.
I believe this margin comes from Docking\Themes\Includes\Styles\AutoHide.xaml, in the {x:Type dockingPrimitives:AutoHideHost} style, since its Padding property is set to 5, which is then bound to the PART_ContentArea's Margin.
Questions:
- Is there a way I can set the margin to 0, without having to author my own style?
- If I remove the margin, is there anything I need to bear in mind? For instance, does removing it cause other tool windows to bump up against each other? Does the margin serve some other purpose that I'm not realizing?
Code Sample:
<Window
x:Class="ActiproSyntaxEditorMarginBug.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:docking="http://schemas.actiprosoftware.com/winfx/xaml/docking"
xmlns:syntaxeditor="http://schemas.actiprosoftware.com/winfx/xaml/syntaxeditor"
Title="MainWindow"
Height="350"
Width="525"
>
<Grid>
<docking:DockSite
AreDocumentWindowsDestroyedOnClose="False"
CanDocumentWindowsRaft="True"
>
<docking:DockSite.Content>
<docking:SplitContainer>
<docking:SplitContainer
Orientation="Vertical"
>
<docking:Workspace>
<docking:TabbedMdiHost>
<docking:TabbedMdiContainer>
<docking:DocumentWindow
Title="Syntax Editor"
>
<docking:DockSite>
<docking:SplitContainer
Orientation="Vertical"
>
<docking:Workspace>
<syntaxeditor:SyntaxEditor
/>
</docking:Workspace>
<docking:ToolWindowContainer>
<docking:ToolWindow
CanClose="True"
Title="Syntax Editor Tool Window"
IsOpen="False"
/>
</docking:ToolWindowContainer>
</docking:SplitContainer>
</docking:DockSite>
</docking:DocumentWindow>
</docking:TabbedMdiContainer>
</docking:TabbedMdiHost>
</docking:Workspace>
</docking:SplitContainer>
</docking:SplitContainer>
</docking:DockSite.Content>
</docking:DockSite>
</Grid>
</Window>
Thanks,
-Craig