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

Newly created theme does not appear in list

14 Answers 545 Views
Themes and Visual Style Builder
This is a migrated thread and some comments may be shown as answers.
piratenwichtl
Top achievements
Rank 1
piratenwichtl asked on 09 Jun 2008, 10:45 AM
Hi Telerik,

I created a new theme for radGridView using the visual style builder
and saved it into my project directory.
afterwards I dragged a new themeManager onto my application and "LoadedThemes"-property, loaded the new created theme.
if I click on my theme manager at "LoadedThemeNames", I am actually seeing it.

but when I click on my radGridView and try to select the new theme, it isnt in the list.
Am I missing someting? Wasted almost 2 hours trying around, please give me advise.
Thank you

Best regards

Christian

14 Answers, 1 is accepted

Sort by
0
chirag
Top achievements
Rank 1
answered on 09 Jun 2008, 10:59 AM
Hi,

Even I am facing su8ch problems . Is there any solution ?
0
piratenwichtl
Top achievements
Rank 1
answered on 10 Jun 2008, 08:21 AM
Hi,

I am using RadControlsWinforms Q1 2008 SP1.
Could you please get back to me regarding this issue, to let me know if this is a bug or simply a "handling"-issue or if there is a work around.
Thank you

Cheers
Christian
0
piratenwichtl
Top achievements
Rank 1
answered on 10 Jun 2008, 03:59 PM
Hi Telerik,

i was actually expecting at least "a" answer, hence I bought the full Telerik package inclusive subscription.
I changed all the Grids in my application to Telerik because I believed this issue wouldndt be much of a problem. I have to rollout the application soonish, and I have to customise the Grid first....( which wasnt much of an issue during development... but it definetely is now!!!).

So its now almost 2 days since my initial posting. Please, I dont want to be annoying but this is really a pain in the arse. I need direction, either the solution or if there are some problems, a statement to chuck it away and go to back to the microsoft grid.

cheers

Christian
0
Martin Vasilev
Telerik team
answered on 11 Jun 2008, 07:37 AM
Hi Christian Menhofer,

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 (for example: "MyTheme.xml").
Please let me know if this does not address the issue.

When you are using our support system, please note that forum posts have a lower priority than support tickets. When you need an answer quickly, I recommend creating a support ticket instead posting in the forums. In this way, you will fully take advantage of your support subscription.
 

If you have other questions, do not hesitate to contact me again.

Greetings,
Martin Vasilev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
piratenwichtl
Top achievements
Rank 1
answered on 11 Jun 2008, 02:19 PM
Hi Martin,

thanks for your answer mate. I opened a support ticket.
While doing this I actually realised, when typing in the actual ThemeName, helps.
Still curious why it wouldnt appear in the list.

Cheers

Christian
0
Martin Vasilev
Telerik team
answered on 12 Jun 2008, 07:44 AM
Hello Christian Menhofer,

I have responded to this question in the support ticket you opened with the same topic. However, I will post the same response here for the benefit of the community.

After some testing, I have discovered there is an issue with adding custom themes in RadGridView. The custom theme does not appear in the theme drop-down list. We will address this in one of our future releases.

Currently, you can apply a custom theme by entering its name in the property grid or setting the property at runtime:
this.radGridView1.ThemeName = "MyCustomTheme"

Also, keep in mind that when you're setting the ThemeLocation property in RadThemeManager, you have to include the namespace before the theme's XML file name: MyNamespace.MyCustomTheme.xml. Excuse me for not mentioning this in the post before.

I have prepared an example application that demonstrates setting a custom theme. Please find it attached to this message.

I have updated your Telerik points. If you have other questions, do not hesitate to contact me again.

Regards,
Martin Vasilev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Meryl
Top achievements
Rank 1
answered on 01 Aug 2008, 03:28 PM
I am having these same problems.

Please provide me with some basic instructions.  Telerik has sent me an example them xml file and I can't even find a way to open it in the theme manager. 

I really need to know how to start from getting the theme file to having it show up in the theme manager to having it show up in the list as the theme property for the tab control.

Thanks!  I've also spent hours on trying to create and use themes.

I am using rad conrols for winforms v2.0.

Thanks You!
Meryl

0
Peter
Telerik team
answered on 04 Aug 2008, 12:57 PM
Hi Meryl,

Thank you for getting back to me.

Could you share more details about the problems with opening the XML in the theme manager. 
I will try to clarify how to load them:
  1. You should Run the Theme Builder from Start Menu->Telerik->RadControls for WinForms Q2 2008.
  2. After that go to File->Load Controls->Telerik.WinControls.UI->RadTabStrip.
  3. Then go to File->Open Theme File and choice TabStripControlDefault.xml

Find attached a simple project with RadTabStrip + Custom Theme (Modified ControlDefault with no mouseover states)

Hope this help.

Kind regards,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
ewart
Top achievements
Rank 1
answered on 27 Aug 2008, 04:54 AM
Using Visual Studio 2008 SP1, RadControls 2008 Q2

Are there also any known issues with the theme manager and scrollbars?  I've tried it as a resource and tried it as a file and also tried with a new standalone project with just the thememanager control and a horizontal scrollbar. 

Issue
After adding the theme to the thememanager the theme does not appear in a dropdown list of available themes on my scrollbar.

Helpful Observations:
1.  If I use the file approach and manually type the name of my theme it did apply at runtime to my standalone project (despite not appearing in the list), but not in  my main project.  After some debugging inside the designer.cs, I discovered that radThemeManager1had was declared after the horitzonal scroll bar in InitializeComponent(), and this was an issue.  Manually editing this file to swap the order allowed the theme to apply from a file at runtime.

2. After editing the thememanager, the designer rewrote InitializeComponent() and buggered my edits, so I was back to square one.
 
3.  Frustratingly, I was not able to get this to apply from my resourcefile, no matter what I did in either project.

regards
ewart





  //   
           // radTheme  
           //   
           themeSource1.StorageType = Telerik.WinControls.ThemeStorageType.Resource;  
           themeSource1.ThemeLocation = "Phoenix.PhoenixScroll.xml";  
           this.radTheme.LoadedThemes.AddRange(new Telerik.WinControls.ThemeSource[] {  
            themeSource1});  
 
           //   
           // radHScrollBar1  
           //   
           this.radHScrollBar1.Location = new System.Drawing.Point(26, 210);  
           this.radHScrollBar1.Name = "radHScrollBar1";  
           this.radHScrollBar1.Size = new System.Drawing.Size(219, 30);  
           this.radHScrollBar1.TabIndex = 2;  
           this.radHScrollBar1.Text = "radHScrollBar1";  
           this.radHScrollBar1.ThemeName = "Phoenix";  
           this.radHScrollBar1.ValueChanged += new System.EventHandler(this.hScrollBar1_ValueChanged);  
           this.radHScrollBar1.Scroll += new System.Windows.Forms.ScrollEventHandler(this.radHScrollBar1_Scroll);  
           //  
0
Peter
Telerik team
answered on 27 Aug 2008, 12:48 PM
Hi ewart,

Thank you for the details - I was able to reproduce your exact case. For the time being, the workaround I can suggest is setting the theme ONLY programmatically, in the Form constructor, right after
InitializeComponent(). Please move the following line from designer.cs to the form constructor:

 this.radHScrollBar1.ThemeName = "Phoenix"

 For example:
        public Form1() 
        { 
            InitializeComponent(); 
 
            this.radHScrollBar1.ThemeName = "Phoenix"
        } 



Please excuse us for the inconvenience. Your Telerik Points have been updated.

If you have additional questions, feel free to contact me.


Kind regards,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
ewart
Top achievements
Rank 1
answered on 27 Aug 2008, 11:14 PM
Ok, I've done this, and also for the trackbar, which seems to have the same problem.

The other issue I mentioned is accessing the theme from a resource file.  Can telerik provide a working sample of how this can be achieved?  This is most important as I don't want the theme files sitting around in my distribution folder.

I did step-by-step through the documentation on both file and resource approaches using the UI but I can't get it to work with those instructions, maybe it needs to be done programatically?

regards
ewart
0
Peter
Telerik team
answered on 28 Aug 2008, 07:45 AM
Hi ewart,

I have attached a sample project that demonstrates how to load a custom theme as a resource. For more information about themes as resource review this KB article.

Don't hesitate to contact us if you have other questions.
 

Kind regards,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
ewart
Top achievements
Rank 1
answered on 07 Sep 2008, 04:32 AM
Thanks Peter, with some more fiddling I got it working.  I can report though there are definetly additional bugs in this area when using with VS2008 (they may be VS2008 bugs).  Taking the sample project, and following the right KB article I noted that after using the step

"From the RadThemeManager's Action Menu (click the Smart Tag to open it) choose Load Theme from resources. "

that when adding a second resource, the resource info is not always written to the designer, which explains why when you run the code, the second theme is not applied (even if you have manually specifiied the theme name in the form_load as previously discussed).  I've found going into the smart tag again, then shifting the order of added resources backwards and forwards must trigger something as then the designer info is written.

hopefully that is helpful info for you guys.

also, to note, and this may just ben an expecation gap on my part, but I manage all my resources via the resource manager designer, e.g.open the "resources.resx" and add/delete resources from there.  I can reference thouse resources from code easily and I had expected to be able to reference embedded theme files in the same manner via telerik controls but it doesn't seem to work, or at least I couldn't get it to work so gave up after period. 

keep up the good work, my scroll bars now look great :)

regards
  ewart

0
Peter
Telerik team
answered on 08 Sep 2008, 04:38 PM
Hello ewart,

Thank you for the great feedback, we really appreciate it.

We will address some of the issues concerning theming and VS2008 design-time in the next release.

Should you have any other questions or ideas, do not hesitate to contact me.

All the best,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Themes and Visual Style Builder
Asked by
piratenwichtl
Top achievements
Rank 1
Answers by
chirag
Top achievements
Rank 1
piratenwichtl
Top achievements
Rank 1
Martin Vasilev
Telerik team
Meryl
Top achievements
Rank 1
Peter
Telerik team
ewart
Top achievements
Rank 1
Share this question
or