4 Answers, 1 is accepted
0
Hi Jorge,
I am not quite sure if I understand your scenario. Could you please clarify your goal? Do you need to use different forms with different themes in one application? If yes, which one of the following is working currently - one theme for all forms, or just one form has a theme? Also, what do you mean by "apply different themes depending on the class name" - how does this apply to the forms?
Thank you for the cooperation.
Sincerely yours,
Peter
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I am not quite sure if I understand your scenario. Could you please clarify your goal? Do you need to use different forms with different themes in one application? If yes, which one of the following is working currently - one theme for all forms, or just one form has a theme? Also, what do you mean by "apply different themes depending on the class name" - how does this apply to the forms?
Thank you for the cooperation.
Sincerely yours,
Peter
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
superold
Top achievements
Rank 1
answered on 29 Sep 2008, 10:16 PM
Hi!
My goal is to be able to theme several forms differently. Form A with TitleBar but not Form B for instance and I wonder if this can be done with StylesheetRelations.
Theme T for RadForm (default)
<StylesheetRelations>
<RadStylesheetRelation RegistrationType="ElementTypeControlType" ControlType="Telerik.WinControls.RadForm" ElementType="Telerik.WinControls.RootRadElement" />
<RadStylesheetRelation ElementType="Telerik.WinControls.UI.RadFormElement" RegistrationType="ElementTypeDefault" />
</StylesheetRelations>
Theme T for MyOwnRadForm : RadForm
How do i make the relation here? I have tried different relations without success.
<StylesheetRelations>
<RadStylesheetRelation RegistrationType="ElementTypeControlType" ControlType="somenamespace.MyOwnRadForm" ElementType="Telerik.WinControls.RootRadElement" />
</StylesheetRelations>
Thanks,
-j
0
Hi,
I am afraid that the scenario is not applicable to RadForm because RadForm overrides the ClassName property and always returns "RadForm". This avoids returning the instance name of the form (like "Form1").
You should create, apply and use separate themes for RadForm.
For example - MyTheme1 for FormA and MyTheme2 for FormB
On the other hand you can inherit the RadForm class and override ClassName to respond to StylesheetRelations property in the theme - see the attached project.
Regards,
Peter
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I am afraid that the scenario is not applicable to RadForm because RadForm overrides the ClassName property and always returns "RadForm". This avoids returning the instance name of the form (like "Form1").
You should create, apply and use separate themes for RadForm.
For example - MyTheme1 for FormA and MyTheme2 for FormB
On the other hand you can inherit the RadForm class and override ClassName to respond to StylesheetRelations property in the theme - see the attached project.
Regards,
Peter
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
superold
Top achievements
Rank 1
answered on 30 Sep 2008, 07:22 PM
thank you. perfect
-j