Sstandard Control Style Not Set

4 posts, 1 answers
  1. John
    John avatar
    26 posts
    Member since:
    Mar 2012

    Posted 19 Jun 2012 Link to this post

    Hi,
    Using runtime set style only set telerik control not set wpf standard control.
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 19 Jun 2012 Link to this post

    Hello,

     I would recommend you to check this documentation article on how to style standard controls.

    Greetings,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. John
    John avatar
    26 posts
    Member since:
    Mar 2012

    Posted 19 Jun 2012 Link to this post

    Hi, Using this code error (Error 1 'Telerik.Windows.Controls.StyleManager' does not contain a definition for 'SetBasedOn' C:\Users\John\Documents\Visual Studio 2010\Projects\RadControlsWpfApp3\RadControlsWpfApp3\MainWindow.xaml.cs 33 26 RadControlsWpfApp3
    )
  4. Answer
    Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 20 Jun 2012 Link to this post

    Hi,

     Indeed you are right - the suggested solution works for Silverlight only.

    In order to apply the application Theme for MS Button in WPF you should do the following:

    public MainWindow()
    {
    StyleManager.ApplicationTheme = new Expression_DarkTheme();
    InitializeComponent();
    }

    <Window.Resources>
            <telerik:Expression_DarkTheme x:Key="Theme" />
            <Style TargetType="Button">
                   <Setter Property="telerik:StyleManager.Theme" Value="{StaticResource Theme}"/>
            </Style>
    </Window.Resources>

    Please find attached sample project for a reference.

    Thank you for the feedback. I am glad to tell you that I have updated your telerik points. I will update the content in the help article as well.


    All the best,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top