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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:03:56+00:00 2026-05-30T16:03:56+00:00

I have a problem where I need to combine a DataTrigger and a PropertyTrigger

  • 0

I have a problem where I need to combine a DataTrigger and a PropertyTrigger into a MultiDataTrigger to show an Image in a GridViewColumn (combined with a TreeView, it’s a custom control I’m using). I experimented and searched some thins on the internet and this is how far I’ve come:

 <Image Width="16" 
        Height="16" 
        Stretch="UniformToFill">
           <Image.Style>
              <Style TargetType="{x:Type Image}">
                  <Setter Property="Source" 
                          Value="{Binding ScorecardNiveau, Converter={StaticResource ScorecardNiveauToImageConverter}}" />
                     <Style.Triggers>
                       <MultiDataTrigger>
                          <MultiDataTrigger.Conditions>
                             <Condition Binding="{Binding WpfSettings.IsExpanded}" Value="True" />
                             <Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=Source}" Value="/folder_closed.png" />
                          </MultiDataTrigger.Conditions>
                          <Setter Property="Source" Value="/folder_open.png" />
                        </MultiDataTrigger>
                     </Style.Triggers>
            </Image.Style>
  </Image>

Now, initially, the Image can have two images, according to the Converter. Either the folder_open, or another one (not important now). Now what I want is: when the TreeViewNode is expanded (WpfSetting.IsExpanded = true) and when the Image Source is folder_closed, I want the Image to get the folder_open image. I think I am close with the above code, but it’s not really working. The Image isn’t changing at all when I open a TreeViewNode.

I think I am doing something wrong with the Condition on the RelativeSource=Self, but I am not sure.

Anyone who can help me please? Thanks in advance.

Of course, more information/code can be provided if needed.

  • 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-30T16:03:57+00:00Added an answer on May 30, 2026 at 4:03 pm

    The problem is not with RelativeSource=Self but when you try to compare Source(which is of type ImageSource) to string value (“/folder_closed.png”), it return false

    Try the following Condition :

    <Condition Binding="{Binding ScorecardNiveau, Converter={StaticResource ScorecardNiveauToImageConverter}}" Value="/folder_closed.png" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following problem: We need to find the next august. I other
I have a problem where I need to remove all code and triggers from
I have the following problem: I need to use XSLFO to generate a 2-column
I have the next problem: I need to process only 1 request at a
I have a problem where I always need to give simple access to my
I have a problem. I need to host grid with controls in ScrollViewer to
I have a problem. I need to trace all read/write operations to the registry
I have a problem with reflection. I need to find the type that instantiates
I have a problem: imagine I have a plugin-based system. I need some kind
i have a problem, i'm working on a gallery php script and need help,

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.