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
"ddobosz" wrote in message news:61618@forums.infragistics.com... 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 http://forums.infragistics.com/forums/p/16957/61618.aspx#61618
This is a very good topic. It is information we need. Are you going to reply soon?
Tom
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.