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 6883963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:26:55+00:00 2026-05-27T05:26:55+00:00

In Windows7 (maybe vista too), TextBoxes now get a blue emphasis rect when they

  • 0

In Windows7 (maybe vista too), TextBoxes now get a blue emphasis rect when they receive input focus or get the MouseOver.

In my WPF app, that blue focus rect really sticks out like a sore thumb – it does NOT match the visual style of the rest of the app.

How do I disable it – or better yet, customise it?

(Setting FocusVisualStyle to {x:Null} in the xaml does nothing.)

  • 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-27T05:26:56+00:00Added an answer on May 27, 2026 at 5:26 am

    This is because of the default style applied for the TextBox. To modify this behavior you have to create a custom style/template. just have a look at this sample

    <Style x:Key="TextBoxStyle1" BasedOn="{x:Null}" TargetType="{x:Type TextBox}">
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="Padding" Value="1"/>
            <Setter Property="AllowDrop" Value="true"/>
            <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
            <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
            <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type TextBox}">
                        <Border x:Name="border" Background="#FF8F8F8F" BorderBrush="#FF585858" CornerRadius="3" BorderThickness="2">
                            <ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </Border>
                        <ControlTemplate.Triggers>
    
                            <Trigger Property="IsFocused" Value="True">
                                <Setter Property="BorderBrush" TargetName="border" Value="Silver"/>
                                </Trigger>
    
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter Property="Opacity" TargetName="border" Value="0.15"/>
                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter Property="BorderBrush" TargetName="border" Value="Silver"/>
                            </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

Windows Explorer in Windows 7, and maybe Vista too (can't rememmber), does not have
I have been searching for about 2 hours now without any luck, maybe I
Something, maybe the windows sdk or visual studio installer, has defined the Platform environment
When using urllib2 (and maybe urllib) on windows python seems to magically pick up
Maybe you can help me... I am writing a program in Windows Mobile that
I have a multithreaded .NET Windows Service that hangs intermittently -- maybe once every
1) Is it possible to use llvm-py on Windows without Visual Studio 2008? Maybe
Just curious. How does actually the function Sleep() work (declared in windows.h)? Maybe not
I am using Windows7 and I do lot of Java coding in Eclipse. But
I've installed (in this order): 64bit Windows7, 64bit Visual Studio 2008, Microsoft Free Web

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.