Theme Office_Blue on button

2 posts, 0 answers
  1. shirley wang
    shirley wang avatar
    28 posts
    Member since:
    Mar 2010

    Posted 05 Aug 2010 Link to this post

    Dear People,

    I have a sample programme.

    <UserControl x:Class="ButtonSample.MainPage"
        d:DesignHeight="300" d:DesignWidth="400">

        <Grid x:Name="LayoutRoot" Background="White">
            <StackPanel Orientation="Vertical">
                <Button Name="btnTest" Width="100" Height="80" Content="Test" Margin="20" telerik:Theming.Theme="Office_Blue"/>
                <Button Name="btnClickMe" Width="100" Height="80" Content="Click me" Margin="20" Click="btnClickMe_Click" telerik:Theming.Theme="Office_Blue"/>

    public partial class MainPage : UserControl
            public MainPage()

            private void btnClickMe_Click(object sender, RoutedEventArgs e)
                this.btnTest.IsEnabled = !btnTest.IsEnabled;

    And i noticed that when the button IsEnabled state is changed from false to true. The button is clickable, but the text on button
    is not so clear. How can i solve this problem?
  2. Miroslav
    Miroslav avatar
    922 posts

    Posted 10 Aug 2010 Link to this post

    Hi shirley wang,

    I tried your example and the "Click" event of the btnTest button will not be raised once it is disabled. Is it another event that you are referring to as "Clickable" ?

    When the button is disabled its contents are grayed-out, this is part of the design. You can change this by editing the Button's ControlTemplate, namely the "Disabled" VisualState.

    I have attached the xaml for the Office_Blue buttons, you may find this useful if you are not using Blend.

    All the best,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top