Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6892863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:35:15+00:00 2026-05-27T06:35:15+00:00

I have a button with some background color, but when I set this button

  • 0

I have a button with some background color, but when I set this button as disabled it looks like a empty textbox. Why is it so and can it be resolved.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:35:15+00:00Added an answer on May 27, 2026 at 6:35 am

    Have you considered defining your own Template for the button. Here is an example.
    See section ‘Trigger Property=IsEnabled…’. Here you can define the appearance as you need it for disabled buttons. I suggest to play with all values and define it for your needs.

    <Style TargetType="Button">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="BorderBrush" Value="LightGray"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border x:Name="bord" 
                         CornerRadius="5" 
                         BorderBrush="{TemplateBinding BorderBrush}"
                         BorderThickness="{TemplateBinding BorderThickness}"
                         TextElement.Foreground="{TemplateBinding Foreground}"
                         TextElement.FontWeight="{TemplateBinding FontWeight}">
                        <Border.Background>
                            <LinearGradientBrush StartPoint="0 0" EndPoint="0 1">
                                <GradientStop Color="Gray" Offset="0"/>
                                <GradientStop Color="DarkGray" Offset="0.5"/>
                                <GradientStop Color="Black" Offset="0.5"/>
                            </LinearGradientBrush>
                        </Border.Background>
                        <ContentPresenter Content="{TemplateBinding Content}" 
                                     HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                     VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" TargetName="bord">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="0 0" EndPoint="0 1">
                                        <GradientStop Color="Gray" Offset="0"/>
                                        <GradientStop Color="DarkGray" Offset="0.5"/>
                                        <GradientStop Color="Black" Offset="0.5"/>
                                        <GradientStop Color="Black" Offset="0.7"/>
                                        <GradientStop Color="LightBlue" Offset="1"/>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="BorderThickness" TargetName="bord" Value="2"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Background" TargetName="bord" Value="Peru"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to have a TabNavigator component that has a close button for some
I am have buttons like this: <button type=button class=img img_button_bla onclick=...>Bla!</button> The img class
I have some problem with my CSS Style. Currently, i have something like this:
I'm trying to set the background color of a UITableViewCell to transparent. But nothing
I have a div tag which has some background color, that adds good look
I have a radio button list and some of the labels are quite long
I have to display yes/no button on some condition on my asp.net page ,
I must have pressed on the wrong button at some point, and now when
I need some advanced CSS help here. I have a login button and a
I have added some dynamic textboxes upon a button click. I need the values

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.