How to apply Theme or RenderOptions.BitmapScalingMode to floating window?

Docking/MDI for WPF Forum

Posted 3 years ago by Markus Springweiler
Version: 16.1.0631
Avatar

I have a themed DockSite and when I create a new floating window the window has wrong theme and the icon assigned to FloatingWindowIcon is only scaled with NearestNeighbor.

In the past (Style against RaftingWindow) I also was able to set window opacity.

The real window class NonHostedFloatingWindow+HostingWindow seems to be private and applying a Style to DockHost doesn't reach the title for BitmalScalingMode and setting ThemeManager.Theme there just crashes the entire application unrecoverably.

[Modified 3 years ago]

Comments (3)

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

Hi Markus,

First, is there a reason you using the static ThemeManager.CurrentTheme property instead of the attached ThemeManager.Theme property?  CurrentTheme uses less overall resources than using Theme all over.

Could you handle the new DockSite.FloatingWindowOpening event and look at the DockHost there and get its ancestor Window?  Then you could set the attached properties on that Window instance.


Actipro Software Support

Posted 3 years ago by Markus Springweiler
Avatar

I am only using the attached property ThemeManager.Theme on DockSite control instance. My intention was to ONLY apply theming to the docking product but now I realize that any Actipro control inside this hierarchy will now be themed. BTW: Your message is confusing -- either there is missing a NOT somewhere in the sentence or it doesn't make sense since I nowhere mentioned CurrentTheme.

[Modified 3 years ago]

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

Hi Markus,

We don't generally recommend using the attached ThemeManager.Theme property, and instead recommend using the static ThemeManager.CurrentTheme property.  I was trying to give a helpful suggestion because CurrentTheme is more resource efficient and applies app-wide, whereas the attached Theme property will clone all the theme resources to the target element's Resources.  It's better just to set things app-wide with CurrentTheme unless you have a specific use-case for Theme.


Actipro Software Support

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