What is the best practice and process for styling the XamDockManager?
I have read the (limited) help topic on styling (http://help.infragistics.com/NetAdvantage/WPF/2008.2/CLR3.x/) and see how I can specify a whole new control template.
But is that the best way? If I just want to change the text (color, size, etc.), background color, do I need to create an entirely new template?
For whatever reason, if creating a new template is the way I want to go, what is the procedure?
Should I copy and paste the contents of one of the existing templates (DockManagerOffice2K7Black & DockManagerOffice2K7Black_Brushes) into new files, rename them, modify the portions of their contents I need to, then import them into my project?
Is there another/better way?
Thanks for any assistance,
Damian
ToolWindowHostWindow is just an internal implementation detail. It is a derived WPF Window class that is used to host a ToolWindow instance when that ToolWindow is to be hosted as a top level window. Now when the ToolWindow happens to be hosted within Window (i.e. ToolWindowHostWindow) there are 2 ways in which the "window chrome" will be rendered. By default the ToolWindow/s UseOsNonClientArea is true in which case the OS is providing the non-client area such as the title bar and borders just as would happen if you use a WPF window. There is no template that controls this area just as there is no template that controls this area for a WPF window; these areas are part of the non-client area of the window and the rendering is done by the OS. When UseOsNonClientArea is false, then the template of the ToolWindow is used to provide the non-client area.
For all of the themes we define/provide, the ToolWindow has a template defined so that when UseOsNonClientArea is set to false or when we will not have the ability to use the os' non-client area (e.g. when used in xbap since the toolwindow cannot be hosted as a toplevel window), it will appear to have non-client area (i.e. titlebar/borders). The ToolWindow (or in the case of xamDockManager a derived class named PaneToolWindow) can be retemplated and you can change the chrome that is used when UseOsNonClientArea is false.
I'm wanting to style the floating tool window. When I use snoop I see that ToolWindowHostWindow is where the titlebar and 'x' are.
ToolWindowHostWindow does not seem to be stylable. Is this true?
Hello,
The Best Practice of restyling/retemplating our controls is to take the default xaml files that we ship in the DefaultStyles directory and use them as a base for your own custom styles/templates. We provede the generic styles and Data|ControlTemplates for all of our controls and their embedded elements as well as some theme brushes for some of them.
If you want to override an existing style from a theme, you can use the following syntax:
<Style TargetType="{x:Type igDP:DataRecordPresenter}" BasedOn="{x:Static Themes:DataPresenterOffice2k7Black. igDP:DataRecordPresenter}">
Let us know if you have further questions on this.
This is a very good topic. It is information we need. Are you going to reply soon?
Tom
Yes, I've stepped through those examples. All they seem to do is allow you to add two different colors and wash the control. We need much more specific control than that.
We would like to be able to style the color of the header text in the various panes; Give the background to those header's a gradient brush; set the style on how the tab looks when collapsed; set the background of the control (the space behind the panes), set the style of the background in the pane, should it's contents not use all of the pane space; customize icons for close, pin, etc. on the header.
Can you provide guidance/an example of how we would do that? Should we create a style that is "BasedOn" an existing style and then override specific properties of the style? If so, could you provide a sample?
thanks,