Thanks for writing and for your question.
Basically, you can edit Office2007Black
theme of RadForm
in Visual Style Builder
and remove the conditions which define the styles of the Form when it is activated/deactivated.
However, since we discovered a small issue which can prevent you from normally editing the theme of RadForm,
there are a few steps which you should follow in order to be able to successfully customize the theme. We have already addressed this issue, and the fix will be available in Q3 2009 which is due for the beginning of November.
Please take a look at these steps which should guide you through:
1. Open the XML file that I am attaching in a text editor (like Notepad) and find the following XML construct:
Basically, this snippet instructs our theming mechanism that the stylesheets defined between the two XmlStyleBuilderRegistration tags are only relevant when the control is of type Telerik.WinControls.UI.RadForm. The ElementType attribute determines that the stylesheets will be applied to all elements down the element tree, starting from an element of type RootRadElement, i.e. the root of the element hierarchy (the hierarchy of visual elements which sum up to the appearance of the control) of RadForm.
2. Change the XML construct in the following way:
3. Open the theme in Visual Style Builder: you will see the default Office2007Black theme settings for RadForm. Now, take a look at the tree view on the left and select the FormBorderPrimitive node. You will see the IsFormActive conditions in the tab strip next to the tree view and below the design view in Visual Style Builder. You can remove the !IsFormActive condition which defines the settings for the appearance of the border of the form when in inactive state.
After finishing your modifications, you should save the theme to a separate file and revert the Telerik.WinControls.UI.FormRootElement line (from the StyleSheetRelations construct shown above) back to Telerik.WinControls.RootRadElement and save the changes again. Then you can load the theme using the RadThemeManager and use it in your project.
For the following procedure you do not
need to modify the XML of the theme as you did above for RadForm
The second thing to do here is to modify the RadTitleBar Office2007Black
theme so that it does not change its background when the form changes its state.
To do this, load RadTitleBar
control in Visual Style Builder and load its Office2007Black
theme (also attached to this post). Take a look at the tree view on the left and find the FillPrimitive
direct under the RadTitleBarElement
node. Select it and delete its !IsFormActive
condition. Save the theme and use it in you project by loading it from RadThemeManager.
I am attaching the Office2007Black
theme for your convenience.
I would also like to inform you that for Q3 2009 we will introduce a property in RadForm
which you will be able to use in order to control the behavior of the Form when in active/inactive state. In this way you do not need to edit themes in Visual Style Builder as described above.
I hope this is helpful. Do not hesitate to write back if you have further questions.
the Telerik team