Theme Render issue - Q3 2011

8 posts, 0 answers
  1. rjmorton
    rjmorton avatar
    17 posts
    Member since:
    Aug 2006

    Posted 12 Dec 2011 Link to this post

    Hi there,

    I have just upgraded my project to Q3 2011 controls and I'm having a problem with theme rendering.
    I'm probably missing something really obvious, but I've tried as much as I can to fix it and nothing is helping.
    Here's the situation:

    Winform project (vs.net 2010/.net 4.0)
    Upgraded to Q3 controls (still have the Q2 tools installed), ran the Telerik upgrade wizard inside Visual Studio - everything finished fine, ALL Telerik references are pointing to 2011.3.11.1116 versions of the .dll's.
    There are no compilation errors or warnings at all in my project.

    The problem is that the themes don't render correctly at run time - almost like the themes are missing or something. I've added the TelerikMetroBlueTheme control to my radform, set the theme properties for the form and the controls to that Theme, but at runtime, there's no close/min/max buttons on the form and the other controls on the form aren't rendering correctly.

    Attached is a screenshot of what the designtime and runtime rendering looks like. The runtime is obviously not rendering correctly.

    If I create a brand new project and add a theme and a form, then it renders correctly - just not for my existing project for some reason. Is Telerik hanging on to something somewhere, or could you point me in the right direction of where to look. Not had this issue before.
  2. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 15 Dec 2011 Link to this post

    Hello Rjmorton,

    Thank you for contacting us.

    We were not able to reproduce this behavior locally and you are the first one to report such issue. Therefore, I would kindly ask you to open a new support ticket and send us the problematic project. This will let us investigate it and provide you with support.

    As of now, I can suggest you to try recreating your theme component at design time and/or applying the theme at run time via the ThemeResolutionService.ApplicationThemeName property.

    I am looking forward to hearing from you.

    All the best,
    Ivan Todorov
    the Telerik team

    Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.

  3. UI for WinForms is Visual Studio 2017 Ready
  4. Ofer
    Ofer avatar
    19 posts
    Member since:
    Jan 2012

    Posted 15 Jan 2012 Link to this post

    Hi
    I have similar problem.
    I am working with vs2010 and i made upgrade to Q3 2012.
    in design time the them looks like there is no them at all. ( it's OK in run time). 
    second in Q2 my app work butt in Q3 i have problems.
    look at this code

       private void SetTreeNodesAttribute()
     {
        forint i = 0; i < treeView.GetNodeCount( true ); i++ ) 
       {
    treeView.Nodes[ i ].ForeColor = Color.FromArgb( 078152 ); 
       }
     }
     
    The  GetNodeCount( true )  get the whole  nodes in tree. But its fail in treeView.Nodes[ i ].ForeColor -> out bound exception  it was  working beautiful in Q2.  

       
  5. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 17 Jan 2012 Link to this post

    Hi Ofer,

    If you are experiencing the issue only at design time, this might mean that Visual Studio has not loaded the proper version of the Telerik.WinControls.UI.Design.dll. This might happen in the following cases:
    1. Immediately after you upgrade a project. You should restart Visual Studio in order to be able to work with the design time functionality.
    2. If the design-time assembly that Visual Studio has loaded is rebuilt while working on the project.
    Issues of this kind appear because Visual Studio loads design time assemblies only once and does not reload them or change their version when this is needed. Generally, to prevent this kind of issues, you should ensure that the proper version of the design dll is available to Visual Studio (e.g. either in the GAC or referenced in the project) and also restart Visual Studio after the upgrading of a project has finished.

    As to the code snippet you have provided, I have tested it with Q2 2011 and it also throws the exception. The exception is thrown because the GetNodeCount(true) will return the count of all nodes in the tree (including the nodes in the branches) and the treeView.Nodes collection contains only the root-level nodes.

    To traverse only the root-level nodes, you should use:
    for (int i = 0; i < radTreeView1.Nodes.Count; i++)
    {
        radTreeView1.Nodes[i].ForeColor = Color.FromArgb(0, 78, 152);
    }

    To set a fore color to all the nodes in the tree, you should add a recursive method call to your cycle, as it is shown below:
    private void radButton4_Click(object sender, EventArgs e)
    {
        for (int i = 0; i < radTreeView1.Nodes.Count; i++)
        {
            radTreeView1.Nodes[i].ForeColor = Color.FromArgb(0, 78, 152);
            SetForeColor(radTreeView1.Nodes[i]);
        }
     
         
    }
     
    private void SetForeColor(RadTreeNode parent)
    {
        foreach (RadTreeNode childNode in parent.Nodes)
        {
            childNode.ForeColor = Color.FromArgb(0, 78, 152);
            SetForeColor(childNode);
        }
    }

    I hope this will help you. Feel free to ask if you have any additional questions.

    Regards,
    Ivan Todorov
    the Telerik team

    SP1 of Q3’11 of RadControls for WinForms is available for download (see what's new).

  6. Ofer
    Ofer avatar
    19 posts
    Member since:
    Jan 2012

    Posted 19 Jan 2012 Link to this post

    Hi Ivan,
    What i did was working in my project at Q2 2011
    Any way thanks for the recursive method. it is better than i did. 
    I didn't install the Q3 yet  so i don't know if it's OK.    
    I want to check few things:
     Is it OK that the Q3 installation  file is half weight from the Q2  installation  file.
    May be we didn't download The file as we should?
    Here is what we have:
    1. Q2 - RadControls_WinForms_2011_2_11_831_dev.msi    154,524KB
    2. Q3 - RadControls_WinForms_2011_3_11_1219_dev.msi   81,464KB
    other help file and just  cod..... 
    Can you please explain me also  what the mining of SP1 ( Service pack 1 ? ); 
    Thank's
    Ofer.  
  7. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 19 Jan 2012 Link to this post

    Hi Ofer,

    You have downloaded Q3 (RadControls_WinForms_2011_3_11_1219_dev.msi) correctly and the size that you point out is the expected one. The file is smaller in size, because we separated the Help2 documentation (this is a desktop version of the documentation) from the suite itself (RadControls, Demo application, Tools). Now, if you want to get the Help2 documentation, you should download a separate file. This decision decreased the internet traffic of those users who are not interested in the desktop documentation, and who occasionally refer to our online documentation when they need help. I would recommend the online version of our documentation as it is usually being updated on weekly basis.

    As to your second questions, yes, I confirm that the meaning of SP1 is Service Pack 1.

    I hope this helps.

    Kind regards,
    Nikolay
    the Telerik team

    SP1 of Q3’11 of RadControls for WinForms is available for download (see what's new).

  8. Ofer
    Ofer avatar
    19 posts
    Member since:
    Jan 2012

    Posted 19 Jan 2012 Link to this post

    Hi Nikolay and thanks.
    I meant, what dose it means SP1 in Q3 Version. What the difference between Q2 and Q3 in this point.
    thanks Ofer.
  9. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 20 Jan 2012 Link to this post

    Hello,

    Each version comes with a detailed list of release notes, so you can see the differences between the versions at our Release Notes page.

    I hope this helps.

    Kind regards,
    Nikolay
    the Telerik team

    SP1 of Q3’11 of RadControls for WinForms is available for download (see what's new).

Back to Top
UI for WinForms is Visual Studio 2017 Ready