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

  • SEARCH
  • Home
  • 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 1053159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:12:33+00:00 2026-05-16T17:12:33+00:00

I have the following style defined… <!– Blue Button –> <Style x:Key=BlueButton TargetType={x:Type Button}>

  • 0

I have the following style defined…

<!-- Blue Button -->
<Style x:Key="BlueButton" TargetType="{x:Type Button}">
  <Setter Property="OverridesDefaultStyle" Value="True"/>
  <Setter Property="Template">
    <Setter.Value>
      <ControlTemplate TargetType="Button">                   
     <Border Name="border" 
        BorderThickness="2"
        Padding="4,2" 
        CornerRadius="5" 
        BorderBrush="{TemplateBinding BorderBrush}"
        Background="{TemplateBinding Background}">
      <Grid >
        <ContentPresenter 
        HorizontalAlignment="Center" 
        VerticalAlignment="Center" 
        Name="content"/>
      </Grid>
    </Border>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter Property="Background" Value="{DynamicResource BlueGradientOver}"/>
        <Setter Property="BorderBrush" Value="White"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Background" Value="Black"/>
        <Setter Property="BorderBrush" Value="White"/>
        <!-- how do I set the BorderThickness here? -->
        <Setter Property="Foreground" Value="White"/>
      </Trigger>             
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Background" Value="{DynamicResource BlueGradient4}"/>
        <Setter Property="BorderBrush" Value="{DynamicResource BlueGradient1}"/>
      </Trigger>
    </ControlTemplate.Triggers>
      </ControlTemplate>
    </Setter.Value>
  </Setter>
  <Setter Property="SnapsToDevicePixels" Value="true"/>
  <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
  <Setter Property="Background" Value="{DynamicResource BlueGradient1}"/>
  <Setter Property="BorderBrush" Value="{DynamicResource BlueGradient2}"/>
  <Setter Property="Foreground" Value="White"/>
  <Setter Property="HorizontalContentAlignment" Value="Center"/>
  <Setter Property="VerticalContentAlignment" Value="Center"/>
  <Setter Property="TextBox.TextAlignment" Value="Center"/>  
  <Setter Property="FontFamily" Value="Trebuchet MS"/>
  <Setter Property="FontSize" Value="15pt"/>
  <Setter Property="Effect" Value="{DynamicResource KioskStandardDropShadow}" />
  <Setter Property="IsEnabled" Value="True"/>
</Style>

I’d like to change the BorderThickness property when a button is disabled, but I can’t figure out how to do it.

  • 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-16T17:12:34+00:00Added an answer on May 16, 2026 at 5:12 pm

    In your control template you are setting the BorderThickness to be 2! It should be:

    UPDATED

    <!-- Blue Button --> 
    <Style x:Key="BlueButton" TargetType="{x:Type Button}"> 
      <Setter Property="OverridesDefaultStyle" Value="True"/> 
      <Setter Property="BorderThickness" Value="2" />
      <Setter Property="Template"> 
        <Setter.Value> 
          <ControlTemplate TargetType="Button">                    
        <Border Name="border"  
            BorderThickness="{TemplateBinding BorderThickness}"  
            Padding="4,2"  
            CornerRadius="5"  
            BorderBrush="{TemplateBinding BorderBrush}" 
            Background="{TemplateBinding Background}"> 
          <Grid > 
            <ContentPresenter  
            HorizontalAlignment="Center"  
            VerticalAlignment="Center"  
            Name="content"/> 
          </Grid> 
        </Border> 
        <ControlTemplate.Triggers> 
          <Trigger Property="IsMouseOver" Value="True"> 
            <Setter Property="Background" Value="{DynamicResource BlueGradientOver}"/> 
            <Setter Property="BorderBrush" Value="White"/> 
          </Trigger> 
          <Trigger Property="IsEnabled" Value="False"> 
            <Setter Property="Background" Value="Black"/> 
            <Setter Property="BorderBrush" Value="White"/> 
            <Setter Property="BorderThickness" Value="10" /> 
            <Setter Property="Foreground" Value="White"/> 
          </Trigger>              
          <Trigger Property="IsPressed" Value="True"> 
            <Setter Property="Background" Value="{DynamicResource BlueGradient4}"/> 
            <Setter Property="BorderBrush" Value="{DynamicResource BlueGradient1}"/> 
          </Trigger> 
        </ControlTemplate.Triggers> 
          </ControlTemplate> 
        </Setter.Value> 
      </Setter> 
      <Setter Property="SnapsToDevicePixels" Value="true"/> 
      <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/> 
      <Setter Property="Background" Value="{DynamicResource BlueGradient1}"/> 
      <Setter Property="BorderBrush" Value="{DynamicResource BlueGradient2}"/> 
      <Setter Property="Foreground" Value="White"/> 
      <Setter Property="HorizontalContentAlignment" Value="Center"/> 
      <Setter Property="VerticalContentAlignment" Value="Center"/> 
      <Setter Property="TextBox.TextAlignment" Value="Center"/>   
      <Setter Property="FontFamily" Value="Trebuchet MS"/> 
      <Setter Property="FontSize" Value="15pt"/> 
      <Setter Property="Effect" Value="{DynamicResource KioskStandardDropShadow}" /> 
      <Setter Property="IsEnabled" Value="True"/> 
    </Style> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In <Window.Resources> I have defined following style: <Style x:Key=textBlockStyle TargetType=TextBlock> <Setter Property=Margin Value=5,0,5,0/> </Style>
I have the following style defined in my App.xaml <Style x:Key=textBoxMultiline TargetType={x:Type TextBox} >
I have following user control: <UserControl.Resources> <Style TargetType=HeaderedItemsControl> <Setter Property=Template> <Setter.Value> <ControlTemplate TargetType=HeaderedItemsControl> <Grid>
<Style x:Key=FavouriteMenuItemStyle TargetType={x:Type MenuItem} BasedOn={StaticResource BasicFavouriteItemStyle}> <Setter Property=Width Value=Auto/> <Setter Property=Template> <Setter.Value> <ControlTemplate TargetType={x:Type
In my application, I have defined the following style for TextBlocks. <Style TargetType={x:Type TextBlock}>
I have the following custom defined Button defined in my App.xaml file. <Style x:Key=DispatchListCallButton
I have a DefaultStyle and then another Style defined like this <Style TargetType={x:Type my:CustomButton}
I have the following style defined which is being applied (as text changes to
I have the following piece of code that generate a jquerymobile-style button <a href=#
newbie question in css: I have the following style defined: TABLE.tabulardata th { font:

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.