How to set FontFamily, FontSize etc. for a ToolWindow (MVVM)

Docking/MDI for WPF Forum

Posted 7 years ago by Michael Bayer
Version: 16.1.0634
Avatar

Hi,

following the documentation of Docking & MDI and your samples I have a couple of viewmodels (inherits ObservableObjectBase), which are added to an DeferrableObservableCollection and are displayed as toolwindows.

How can I set the Font-Properties for this ToolWindows (and also DocumentWindows) in MVVM ?

Thanks in advance

Michael

[Modified 7 years ago]

Comments (5)

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

Hi Michael,

If you look at the MVVM samples, you'll see there are Styles in the sample resources that have Setters for doing bindings to VM properties.  But you could put any kind of Setter there too, such as you want to set a FontFamily to a specific value.


Actipro Software Support

Posted 7 years ago by Michael Bayer
Avatar

Sorry for not didn't express myself well: I want to set FontFamily, FontSize etc. for the titles of the DockingWindows in MVVM. How can I achieve that?

Thank you

Michael

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

Hi Michael,

There are some Title* properties like TitleFontFamily on ToolWindowContainer that you can set.  However to get them to properly apply to all instances, you want to make an implicit Style for ToolWindowContainer in your app's Resources to set those, and don't set them on specific instances.


Actipro Software Support

Posted 7 years ago by Michael Bayer
Avatar

Thank you. This works fine for the titles, when the ToolBoxWindow is opened. How can I change Font properties of the title, when the windows are in state Autohidden?

Regards

Michael

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

Hello,

If you do what I said in the previous reply, it will apply to all tool window containers, regardless of whether they are docked or auto-hidden.


Actipro Software Support

The latest build of this product (v24.1.1) 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.