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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:42:12+00:00 2026-05-24T08:42:12+00:00

I have a problem with my combobox I’m trying to customize. It is in

  • 0

I have a problem with my combobox I’m trying to customize. It is in a UserControl, and i want its BorderBrush property to change from Transparent to White when the mouse is over it (fade in/out would be bonus).

But I can’t seem to get the proper Trigger syntax to do so… now I feel confused and I’m probably missing something obvious here.

Here is the combobox in question:

<ComboBox x:Name="comboEmiCategories" ItemsSource="{Binding}" Background="Transparent" Height="15px" Width="30px" BorderBrush="Transparent" Padding="-2">
                    <ComboBox.Resources>
                        <sys:Double x:Key="{x:Static SystemParameters.VerticalScrollBarWidthKey}">0</sys:Double>
                    </ComboBox.Resources>
                    <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <Image Source="{Binding}" Stretch="UniformToFill" Height="15px" Width="30px" Margin="0" />
                        </DataTemplate>
                    </ComboBox.ItemTemplate>
                    <ComboBox.Template>
                        <ControlTemplate>
                            <ControlTemplate.Triggers>
                                <Trigger Property="ComboBox.IsMouseOver" Value="True">
                                    <Setter Property="ComboBox.BorderBrush" Value="White" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </ComboBox.Template>
                </ComboBox>

The trigger isn’t working, even worse actually, if i don’t comment out the whole ComboBox.Template part, the control disappears.

The main goal would be to have a ComboBox that stacks images and allows the user to select one out of a list, with nothing else than those images shown.

Thanks.

EDIT:
Mario’s solution of putting it within a style works, but is it the only way to do this?

  • 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-24T08:42:13+00:00Added an answer on May 24, 2026 at 8:42 am

    Try to place the below xaml within the Resources section of your window/usercontrol.

    <Style x:Name="cbStyle" TargetType="ComboBox">
       <Setter Property="BorderBrush" Value="Transparent" />
       <Style.Triggers>
          <Trigger Property="IsMouseOver" Value="True">
             <Setter Property="BorderBrush" Value="White" />
          </Trigger>
       </Style.Triggers>
    </Style>
    

    Of course you must refer this style in the ComboBox element. Also cut anything within the ControlTemplate, which is useless.

    EDIT: your ComboBox section should look as follows:

    <ComboBox x:Name="comboEmiCategories" ItemsSource="{Binding}" Height="15px" Width="30px" Style="{StaticResource cbStyle}" Padding="-2">
                        <ComboBox.Resources>
                            <sys:Double x:Key="{x:Static SystemParameters.VerticalScrollBarWidthKey}">0</sys:Double>
                        </ComboBox.Resources>
                        <ComboBox.ItemTemplate>
                            <DataTemplate>
                                <Image Source="{Binding}" Stretch="UniformToFill" Height="15px" Width="30px" Margin="0" />
                            </DataTemplate>
                        </ComboBox.ItemTemplate>
                    </ComboBox>
    

    Also put the Style declatarion in your UserControl.

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

Sidebar

Related Questions

I have this stupid problem. I bind from view model class property type of
I have some problem with my combobox, I'm trying to fill it with some
I have a problem where scrolling in both a toolStripComboBox and regular ComboBox is
I have this issue with ComboBox that uses IEnumerable<Brush> as ItemsSource; the problem lies
I have problem with return statment >.< I want to store all magazine names
I have problem creating new instance of excel 2007 using VBA (from Access 2002).
I have a problem with AutoCompleteBox. I wanted to use it as editable combobox.
I have this problem: I have a datagridview that reads the data from a
I have some problem to access the Window's DataContext from within a DataGrid. The
I was trying to create a custom combobox that inherited from ComboBox, but I've

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.