changing theme at runtime

8 posts, 0 answers
  1. Chitra Krishnan
    Chitra Krishnan avatar
    16 posts
    Member since:
    Nov 2009

    Posted 19 Nov 2009 Link to this post

    Hi Team,

    Can u please let me know how to changes canvas themes at runtime..?

    Regards
    Chitra K

  2. Dimitrina
    Admin
    Dimitrina avatar
    442 posts

    Posted 19 Nov 2009 Link to this post

    Hi Chitra Krishnan,

    In order to apply  the themes at runtime you have to set
    telerik:StyleManager.Theme="{Binding SelectedValue, ElementName=Themes}"
    on all controls how you are using. In the snippet above, ElementName is the x:Name of the control used to change the themes. Have a look at the attached sample project and let us know if you have any additional questions.

    Greetings,
    Dimitrina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Chitra Krishnan
    Chitra Krishnan avatar
    16 posts
    Member since:
    Nov 2009

    Posted 20 Nov 2009 Link to this post

    Hi Dimitrina

    I am using Raddocpane in my project.

    1. I have a coverflow in one radpane. when i select office_silver the coverflow is disappearing.
    2. Inside each radpane i am using canvas. canvas is not getting applied with the runtime themes.
    2. Silverlight datagrid is not reflecting the themes.
    4. Pager is not reflecting the themes.

     

    Please give me a suggestion.

    Regards
    Chitra K

  4. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 23 Nov 2009 Link to this post

    Hi Chitra Krishnan,

    We do not provide themes for Microsoft Silverlight DataGrid or Pager controls. This is why nothing happens to them when the theme is changed.
    Could you send us sample project demonstrating the disappearing RadConverFlow?

    Best wishes,
    Hristo
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Bhargavi Kanchi
    Bhargavi Kanchi avatar
    3 posts
    Member since:
    Nov 2009

    Posted 23 Nov 2009 Link to this post

    Can you please let me know how to change the theme of a RadComboBox having the options for the user to select the themes.?

    Here is my code and I want to set the Theme for cmbThemes also?

     

     

    <input:RadComboBox x:Name="cmbThemes" Canvas.Top="0" Height="15"

     

    Width="150" SelectionChanged="cmbThemes_SelectionChanged"

     

     

     

    FontSize="10" > 

     

     

     

    <ctr:Office_BlueTheme />
    <ctr:Office_SilverTheme/>

     

     

     

    <ctr:SummerTheme/>

     

     

    <ctr:VistaTheme/>
    <ctr:Windows7Theme/>

     

     

    </input:RadComboBox>

    In Selection Changed Event, I am setting the ThemeProperty to the Selected Value of the Combo.
    Theme of Combobox is getting changed ,but all the events in the page are getting cancelled off which is not allowing me to do
    anything on the page.

    Please provide the information....

     

     

     

     

     

     

     

     

     

     

  6. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 24 Nov 2009 Link to this post

    Hello Bhargavi Kanchi,

    You can do it in code (like you did) or you can Bind ThemeProperty to RadComboBox.SelectedItem. This way there will be no code.
    <input:RadComboBox x:Name="cmbThemes" Canvas.Top="0" Height="15" Width="150" FontSize="10" ctr:StyleManager.Theme={Binding SelectedItem, ElementName=cmbThemes}> 
       <ctr:Office_BlueTheme />  
       <ctr:Office_SilverTheme/>  
       <ctr:SummerTheme/>  
       <ctr:VistaTheme/>  
       <ctr:Windows7Theme/>  
    </input:RadComboBox>

    If there are other controls you can use the same binding for them so that they will change their themes if comboBox theme is changed.

    I do not understand what do you mean with "all the events in the page are getting cancelled off".
    Could you elaborate more on this? A sample project demonstrating the problem will be very helpful

    Kind regards,
    Hristo
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  7. Bhargavi Kanchi
    Bhargavi Kanchi avatar
    3 posts
    Member since:
    Nov 2009

    Posted 24 Nov 2009 Link to this post

    Hi Hristo ,

    When changing the theme for Even Themes radCombo, then
    all the events of the Controls are not working. I am not able to select , click, and enter text for the Controls.
    I am not able to attach the project file..It is allowing .gif,.jpg,.jpeg,.png..


    Thanks,
    Bhargavi.
  8. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 25 Nov 2009 Link to this post

    Hi Bhargavi Kanchi,

    In order to attach files you should open a support thread.

    Regards,
    Hristo
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top