Posted 2 years ago by rex hui
Version: 17.1.0652
Avatar

I have a RibbonWindow which contains a DockSite with DocumentWindows.

For the Metro theme, the DocumentWindow has a 1 pixel border which looks nice when the window is in normal state. But when it is maximized, the white borders on the left and right don't look good anymore especially, my window content is black. For the Office themes, there are no such border. 

Is there a way to get rid of this border when the window is maximized?

Comments (7)

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Could you make a screenshot showing what you see and post a link to that along with some simple XAML that we can paste in a Window to try it and see it here?  Thanks!


Actipro Software Support

Posted 2 years ago by rex hui
Avatar

Yes, thank you. Just the very basic:

<ribbon:RibbonWindow x:Class="WpfRibbon.RibbonWindow1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared"
xmlns:ribbon="http://schemas.actiprosoftware.com/winfx/xaml/ribbon"
xmlns:themes="http://schemas.actiprosoftware.com/winfx/xaml/themes"
xmlns:docking="http://schemas.actiprosoftware.com/winfx/xaml/docking"
ApplicationName="RibbonWindow1" Width="820" Height="620" ResizeMode="CanResizeWithGrip" >
<docking:DockSite Margin="0" BorderThickness="0" Padding="0" >
<docking:Workspace BorderThickness="0" Padding="0" Margin="0" >
<docking:TabbedMdiHost ContainersHaveNewTabButtons="True">
<docking:TabbedMdiContainer>
<docking:DocumentWindow Name="Sess1" Title="Session 1" />
<docking:DocumentWindow Name="Sess2" Title="Session 2" />
</docking:TabbedMdiContainer>
</docking:TabbedMdiHost>
</docking:Workspace>
</docking:DockSite>
</ribbon:RibbonWindow>

 

Normal window state is fine:

Do not want the left and right border when window is maximized:

https:/s2.postimg.org/j7csn83bt/screenshot.png

[Modified 2 years ago]

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

I believe if you add this under the TabbedMdiHost, it will remove the one pixel border around the tab page content:

<docking:TabbedMdiHost.TabControlStyle>
	<Style TargetType="docking:AdvancedTabControl">
		<Setter Property="BorderThickness" Value="0" />
	</Style>
</docking:TabbedMdiHost.TabControlStyle>


Actipro Software Support

Posted 2 years ago by rex hui
Avatar

Thanks. That works but is it possible to have that applied to maximized windows only. I like to have the border for normal windows.

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

You'd probably have to dynamically set that property to the Style (store the Style in resources with a x:Key) when the window was maximized to achieve that.


Actipro Software Support

Posted 2 years ago by rex hui
Avatar

Question is how to detect window was maximized, both for the RibbonWindow and for the case of a floating window?

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Well that's true, you couldn't probably change it up properly if you allow floating documents since that root TabbedMdiHost.TabControlStyle property value gets pushed to all TabbedMdiHosts that are on floating MDI areas too.  You'd need to stick with always having it be the standard appearance or always using the Style I mentioned.


Actipro Software Support

The latest build of this product (v2019.1 build 0682) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.