Document Window Trasnparency

Docking/MDI for WPF Forum

Posted 14 years ago by Aristo - Senior Team Leader, Petrolink Services
Version: 11.1.0542
Avatar
Hi all, I want to ask whether it is possible to make a document window transparent in either Rafting mode or tabbing mode (hosted rafting window).

Part of this is similar to fading triggered by InactiveRaftingWindowFadeDelay but I want to use this in active condition rather than triggered by inactive and delay.

Other part of this is possibility to use transparency against other tab content in tabbing condition.

Thanks beforehand.

Comments (11)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Aristo,

We don't currently have any fading options, other than the inactive fading that you mention (which works for hosted rafting windows).

If you set the Opacity of the DocumentWindow/ToolWindow, then that will probably fade their associated tabs, but it won't affect it's content. But as you specify the content yourself, you could set the opacity there as well, You could probably also bind it to the Opacity of the associated DocumentWindow/ToolWindow.


Actipro Software Support

Posted 14 years ago by Aristo - Senior Team Leader, Petrolink Services
Avatar
I have tried to set opacity of the content, but unfortunately it does not affect transparency. The content is indeed fading, but it is against its own background rather than transparent.
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Aristo,

You probably will never get anything that is fully transparent (i.e. sees through to the desktop). You would probably have to create a custom Style/ControlTemplate for the TabbedMdiContainer to remove it's background. You can take the default Styles/ControlTemplate and tweak it to your needs.


Actipro Software Support

Posted 14 years ago by Aristo - Senior Team Leader, Petrolink Services
Avatar
Hmm, I don't mean this is fully transparent to the desktop. As long tabs (and rafting document window) can be transparent to each other inside the docksite, it is okay.

The problem is, the rafting document window content opacity when set, seems to be fading against some hidden container (RaftingWindowControl?), on the Docksite. I want at least the rafting the document window is transparent against the tabs behind it. Is it possible to do it, as I suspect there is some hidden container I need to access?

If it is not possible, and probably for better Actipro Docking, I would like to ask for this opacity properties to work in later version. (^.^) Nevertheless, I would like a way for current version to make at least the hosted rafting document window can be set as transparent against each other and the tabs behind it (like the inactive condition).
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Aristo,

If you are just concerned with setting the opacity on hosted rafting (i.e. floating) windows, then you can set the RaftingWindowControl.Opacity property. If you are using this in conjunction with the fading feature, then the current animation may prevent you from setting Opacity. You would need to call BeginAnimation(UIElement.OpacityProperty, null) on the RaftingWindowControl to clear it.


Actipro Software Support

Posted 14 years ago by Aristo - Senior Team Leader, Petrolink Services
Avatar
How can I access the property? As I don't know how to access RaftingWindowControl itself. Can you give me some example?
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Aristo,

Given a floating ToolWindow/DocumentWindow, you can use the VisualTreeHelperExtended.GetAncestor(window, typeof(RaftingWindowControl)) to gain access. Alternatively, you can create a custom DockSite and override CreateRaftingWindow to gain access to the RaftingWindowControl when it's created.


Actipro Software Support

Posted 14 years ago by Aristo - Senior Team Leader, Petrolink Services
Avatar
Ok I confirmed that I can access opacity through overriding CreateRaftingWindow, thanks a lot. Nevertheless I would still suggest the opacity setting for tabbing or rafting window your future version. Thanks again.
Posted 14 years ago by Aristo - Senior Team Leader, Petrolink Services
Avatar
Additional question, is there any way to make certain Part of the RaftingWindowControl not affected by the opacity? Say for example I don't want the title and the toolbar inside the Document window will be transparent. So only content part of the HostedraftingDocumentWindow will be transparent. I saw that setting the opacity on RaftingWindowControl will make all parts of the RaftingWindow transparent.
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Aristo,

That should be possible, but you'd have to create a custom Style/ControlTemplate for the RaftingWindowControl and/or ToolWindowContainer/RaftedDocumentWindowContainer to remove their backgrounds. You can take the default Styles/ControlTemplate and tweak it to your needs.


Actipro Software Support

Posted 14 years ago by Aristo - Senior Team Leader, Petrolink Services
Avatar
Ok I managed to do that by overriding CreateRaftingWindow and set Background for needed part as transparent. Thanks again.
The latest build of this product (v24.1.3) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.