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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T18:41:47+00:00 2026-05-21T18:41:47+00:00

This is a follow-up to a question I posted yesterday here . Binding to

  • 0

This is a follow-up to a question I posted yesterday here. Binding to icons works, using the code-snippet posted by H.B., but I can’t seem to figure out how to add a trigger condition to it so that a different icon will be displayed on mouseover. The current code looks like this:

    xmlns:res="clr-namespace:MyProject.Resources"
    xmlns:Helpers="clr-namespace:MyProject.Converters"
    ...
    <Image Name="imgMin"
           Grid.Column="0"
           Stretch="UniformToFill"
           Cursor="Hand" 
           MouseDown="imgMin_MouseDown">
        <Image.Source>
            <Binding Source="{x:Static res:AppResources.minimize}">
                <Binding.Converter>
                    <Helpers:IconToImageSourceConverter/>
                </Binding.Converter>
            </Binding>
        </Image.Source>
    </Image>

What do I need to change here so that a different icon (res:AppResources.minimize_glow) is displayed on mouseover? I tried messing around with getting a trigger in there somewhere, but Image.Source doesn’t accept another child, Binding doesn’t support direct content, changing Image.Source to Image.Style doesn’t work because Style cannot contain Binding… I’m running out of ideas here, and my Google-fu is failing to come up with anything useful. Besides, even if I could get a Trigger to work with this, putting a Binding to the highlighted icon into the Trigger would probably be my next headache. There has to be a way to do this, right?

  • 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-21T18:41:48+00:00Added an answer on May 21, 2026 at 6:41 pm

    You can add a style with a trigger combined with a setter to replace the image source with a new image source while the mouse is over the image. Remember that any setters in a style will have no effect if you set the property directly on the image. That is why we have the default setter in the style. I don’t have visual studio available at the moment so I can’t test, but hopefully the snippet will guide you.

    <Image Name="imgMin"
           Grid.Column="0"
           Stretch="UniformToFill"
           Cursor="Hand" 
           MouseDown="imgMin_MouseDown">
        <Image.Style>
            <Style>
                <Style.Resources>
                    <Helpers:IconToImageSourceConverter x:Key="IconToImageSourceConverter"/>
                </Style.Resources>
                <Setter Property="Image.Source">
                    <Setter.Value>
                        <Binding Source="{x:Static res:AppResources.minimize}"
                                 Converter="{StaticResource IconToImageSourceConverter}"/>
                    </Setter.Value>
                </Setter>
                <Style.Triggers>
                    <Trigger Property="Image.IsMouseOver" Value="True">
                        <Setter Property="Image.Source">
                            <Setter.Value>
                                <Binding Source="{x:Static res:AppResources.minimize_glow}"
                                         Converter="{StaticResource IconToImageSourceConverter}"/>
                            </Setter.Value>
                        </Setter>
                    </Trigger>
                </Style.Triggers>
            </Style>
        </Image.Style>
    </Image>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a follow-on question from the one I asked here . Can constraints
This is a follow-up to a question I posted a while back: Can I
This post is a follow-up of a related question posted here by Ran .
This is a follow-up question to a question I posted here . I am
This is a follow-up question to the one I posted here (thanks to mario
this is a follow-up to the question I posted yesterday. I was able to
This is a follow-up to an earlier question I posted on EF4 entity keys
This is a follow up on the question Android accesing soap service posted by
This is somewhat of a follow up to a question posted earlier last month.
My question is sort of a follow on from this question below but I

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.