Rafted Document Window focus rectangle

Docking/MDI for WPF Forum

Posted 1 year ago by SledgeHammer01
Version: 11.1.0662
Avatar

When I raft a document window, it has a focus rectangle around the content and the title bar. How do I disable this focus rectangle? I've tried defining a style against both RaftingHost and RaftedDocumentWindowContainer and setting FocusVisualStyle={x:Null} and Focusable=false... but it doesn't remove it. Any idea?

Comments (5)

Posted 1 year ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Sorry but I'm not sure we've seen this.  I couldn't reproduce any focus rectangle just now.  Can you tell us exactly how to reproduce it in our samples and which build you are on?


Actipro Software Support

Posted 1 year ago by SledgeHammer01
Avatar

Hi,

I'm looking at 2011.1.

 

1) Run sample browser

2) Docking Samples

3)  New! MVVM Features (external window)

4) Tear off "WelcomeDocument.rtf" document tab

 

Notice the entire client area is surrounded by a focus rectangle. When you click on the client area (give something focus), that focus rectangle goes away obviously, but in the case where we don't have focusable items, we don't want to show the focus rect there. I'm having trouble determining where in the visual tree that focus rect is coming from in the rafting window and how to disable it.

Posted 1 year ago by SledgeHammer01
Avatar

After much testing and hacking, it seems the focus rectangle is coming from the

RaftedDocumentWindowContainer element. I can hack in FocusVisualStyle=null in the code and it gets rid of it, but I was trying to use a Style, but it doesn't seem to work there... am I doing this right?

xmlns

:t="clr-namespace:ActiproSoftware.Windows.Controls.Docking.Primitives;assembly=ActiproSoftware.Docking.Wpf351"

 

<Style TargetType="{x:Type t:RaftableDockingWindowContainer}">

<Setter Property="FocusVisualStyle" Value="{x:Null}" />

</Style>

 

I put that in my app.xaml for testing. Works through code, but not this way...

Posted 1 year ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

I'm trying in 2011.1 build 545 and I don't see it with the steps you provided.  Perhaps you're on an older build and we fixed it later?  What you have as the Style for a workaround looks ok.  Just be sure you have it in your App.Resources so it applies to all Windows in the app.  I would think it would get applied if done at the App.Resources level.  If that's not working though (you indicated it wasn't) then you might have to stick with your programmatic logic for now.

[Modified 1 year ago]


Actipro Software Support

Posted 1 year ago by SledgeHammer01
Avatar

I'm using 2011.1 build 545. In the App.Resources doesn't get picked up for some reason. I tried with other properties like FontSize and that didn't get picked up either. Oh well... I just overrode DockSite::CreateRaftingWindow() and nulled out the FocusVisualStyle in the Loaded event.

The latest build of this product (v2018.1 build 0675) 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.