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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:31:22+00:00 2026-05-11T11:31:22+00:00

I created a FlatCombo Style that I want to apply to a combo box.

  • 0

I created a FlatCombo Style that I want to apply to a combo box. The one thing that does not work the way that I want is when the ComboBox has focus. I want almost no indication that it has focus. Currently there is a blue highlight on the text area. I assume this is being picked up from my 3rd party resource dictionary. How do I adjust my local style so all it shows on focus is a light dashed line?

Thanks,

Dave

<UserControl.Resources>      <Style x:Key='MyFocusVisual'>         <Setter Property='Control.Template'>             <Setter.Value>                 <ControlTemplate>                     <Rectangle Margin='-1' StrokeThickness='1' Stroke='Black' StrokeDashArray='1 2'/>                 </ControlTemplate>             </Setter.Value>         </Setter>     </Style>      <ControlTemplate x:Key='FlatCombo' TargetType='{x:Type ComboBox}'>     <ContentControl                     Content='{TemplateBinding SelectionBoxItem}'                     ContentTemplate='{TemplateBinding SelectionBoxItemTemplate}'                     ContentTemplateSelector='{TemplateBinding ItemTemplateSelector}'                     Margin='0,0,0,0'  Focusable='True'          /> </ControlTemplate>  <Style TargetType='{x:Type ComboBox}' x:Key='DropDown'>     <Setter Property='OverridesDefaultStyle' Value='False' />     <Style.Triggers>         <MultiTrigger>             <MultiTrigger.Conditions>                 <Condition Property='IsMouseOver' Value='False' />                 <Condition Property='IsFocused' Value='False'/>             </MultiTrigger.Conditions>             <Setter Property='Template' Value='{StaticResource FlatCombo}' />         </MultiTrigger>     </Style.Triggers> </Style> 

        <ComboBox IsSynchronizedWithCurrentItem='True' x:Name='ComboBoxMinute' Width='Auto'                Height='Auto' HorizontalAlignment='Center'                Background='{Binding Path=Background, ElementName=TextBlockDate, Mode=Default}'                BorderBrush='{x:Null}' FontFamily='{Binding Path=FontFamily,                ElementName=TextBlockDate, Mode=Default}'                FontSize='{Binding Path=FontSize, ElementName=TextBlockDate, Mode=Default}'                Foreground='{Binding Path=Foreground, ElementName=TextBlockDate, Mode=Default}'                Padding='0,0,0,0' MaxDropDownHeight='200' Style='{StaticResource DropDown}' VerticalContentAlignment='Stretch'                VerticalAlignment='Center' FocusVisualStyle='{DynamicResource MyFocusVisual}'/> 
  • 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. 2026-05-11T11:31:22+00:00Added an answer on May 11, 2026 at 11:31 am

    You should set OverridesDefaultStyle to True, rather than false. You are completely replacing the control, so it’s all going to be replaced.

    However, looking at your code, you say you want it to be flat when focused; yet your triggers are going to only the flat control template when the control is not focused, and the mouse is not over it. Is that what you want?

    Another aspect to consider here, is that the text box in the case of an editable combo will have the text highlight in blue, which is something I believe can’t be changed currently.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a simple, stripped ListView style that highlights an element when the IsMouseOver
I created a cursor from the one that was described on this post: SQL
I created a JApplet using Netbeans 6.5.1 that accesses a database. When the program
created a singleview application with storyboard. Added three viewcontrollers apart from the one view
Created a google map with GMap2 and put pinpoints on there that open up
Created a custom validation attribute and I would like to get it to work
I created a file in \res\layout named contactlist.xml But it is not recognized in
Created a WCF service that is being called by a Silverlight app. Both reside
Created new scaffold Users that has fields name & description All working as suppose
Created a AlertDialog that is used to prompting the user to enter a keyword.

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.