This is a migrated thread and some comments may be shown as answers.

Theme file path problem

10 Answers 177 Views
Themes and Visual Style Builder
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 16 Jul 2008, 12:18 AM
Hi...

I've added a radtheme manager to my form loading themes from a file, but when i redistrubute my application, the path gets "hardcoded" to the project with my original folder path. Is there a way to reference to a project file or folder?

thanks

10 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 16 Jul 2008, 11:35 AM
Hi David,

Thank for interest in RadContols.

Please, set the ThemeLocation property according to the following pattern:
"~..\..\ThemeFileName.Extention", assuming that the theme file is in the project directory. The ~ sign mean the root project folder.
For more information how to add custom themes to your application please read the following KB Article

Hope this helps.


Greetings,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
David
Top achievements
Rank 1
answered on 16 Jul 2008, 04:04 PM
Thanks a lot!!, it worked great with the embebbed resource.
0
Shweta
Top achievements
Rank 1
answered on 23 Jul 2008, 07:13 AM
hi ,

... if we need to set path according to our folder structure then what is the use of adding theme to the project resource (i.e. setting the storage type of radThemeManager as Resource)  ... and when i did this I dint get that theme with my other themes list ....

Regards,
Shweta
0
Martin Vasilev
Telerik team
answered on 23 Jul 2008, 01:28 PM
Hi Shweta,

Thank you for writing.

To avoid the theme loading issues, I suggest using the XML theme files as Embedded Resource. To do this, please follow the steps below:
  1. Set the Build Action property to "Embedded Resource" for each of the theme files (you can see this property in the property grid for the corresponding file). 
  2. In the theme manager, change the StorageType property of ThemeSource to "Resource"
  3. In the theme manager, change the ThemeLocation to theme file name including namespace (for example: "MyNamespace.MyCustomTheme.xml").
I hope this helps, If you have other questions, do not hesitate to contact me again.

Best wishes,
Martin Vasilev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Henryk
Top achievements
Rank 1
answered on 28 Nov 2014, 10:33 AM
Hi,
I load themes as files and its work fine.
Then i change to your version ( load themes as resources) and it works only in design window in visual studio, but when i start application it does not.
When i change it to load themes as file as the first time, it works as he variant with resources. How resolve this problem?
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 03 Dec 2014, 07:25 AM
Hello Henryk,

Thank you for writing.

Please refer to our Adding a custom theme as a resource help article which is quite useful on this topic. Additionally, I have prepared a sample video (drag and drop over the browser to play) demonstrating the steps. You can find it in the attachment.

I hope this information helps. Should you have further questions, I would be glad to help.

Regards,
Desislava
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Henryk
Top achievements
Rank 1
answered on 03 Dec 2014, 08:27 AM
Thank you for reply.
Idid every thing like in video, and i can choose this theme for my buton, and i can see styled buton but only in design view in visual studio. When i run application i can see this styled buton:( Why?
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 08 Dec 2014, 07:00 AM
Hello Henryk,

Thank you for writing back.

If the RadButton.ThemeName is not reset at run-time, you are supposed to obtain a styled button, following the demonstrated steps from my sample video. Could you please provide a video demonstrating the steps that you perform together with the result that you obtain? Additionally, could you please specify the exact version that you are currently using? Thank you in advance.

Another approach is to open a support ticket where you can provide the sample project reproducing the described problem. Thus, we would be able to investigate the precise case and assist you further. 

I am looking forward to your reply.

Regards,
Desislava
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Henryk
Top achievements
Rank 1
answered on 08 Dec 2014, 08:58 AM
Hello,
thank you for reply
I just solved problem. In 3 step "In the theme manager, change the ThemeLocation to theme file name including namespace (for example: "MyNamespace.MyCustomTheme.xml")". In my case solving was set ThemeLocation to MyNamespace.Resources.MyCustomTheme.xml.
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 10 Dec 2014, 06:47 PM
Hello Henryk,

Thank you for writing back.

I am glad that the issue you were facing is now resolved. In the referred help article in my post from 03-Dec-2014 it is noted that in a C# application the pattern for the resource location is ProjectDefaultNamespace.ContainingFolderName.ThemeFileName.Extention if the theme file is in a folder, otherwise it is just ProjectName.ThemeFileName.Extention.

I hope this information helps. If you have any additional questions, please let me know.

Regards,
Desislava
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Themes and Visual Style Builder
Asked by
David
Top achievements
Rank 1
Answers by
Peter
Telerik team
David
Top achievements
Rank 1
Shweta
Top achievements
Rank 1
Martin Vasilev
Telerik team
Henryk
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or