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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:18:17+00:00 2026-05-15T15:18:17+00:00

I have a TreeView with a ToggleButton ( ExpanderButton ). The togglebutton has a

  • 0

I have a TreeView with a ToggleButton ( ExpanderButton ). The togglebutton has a two images ( one for expanded and one when not ). However when I select a TreeViewItem I highligh it with a different color and I’d like to change the color of the images as well ( I have the same ones in the other color ).

Problem is I don’t know how to set a trigger property on the ToggleButton to the IsSelected property on the TreeViewItem.

Any Ideas?

  • 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-15T15:18:18+00:00Added an answer on May 15, 2026 at 3:18 pm

    Here if anyone else needs this.

    <ControlTemplate TargetType="ToggleButton">
                    <Image Name="ExpanderImage" Height="24" Width="24" Source="..\Images\Icons\32x32\Blue\Open.png" />
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter TargetName="ExpanderImage" Property="Source" Value="..\Images\Icons\32x32\Blue\Close.png" />
                        </Trigger>
                        <DataTrigger Binding="{Binding Path=IsSelected, RelativeSource={RelativeSource TemplatedParent}}" Value="True">
                            <Setter TargetName="ExpanderImage" Property="Source" Value="..\Images\Icons\32x32\Green\Open.png" />
                        </DataTrigger>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding Path=IsChecked, RelativeSource={RelativeSource Self}}" Value="True" />
                                <Condition Binding="{Binding Path=IsSelected, RelativeSource={RelativeSource TemplatedParent}}" Value="True" />
                            </MultiDataTrigger.Conditions>
                            <Setter TargetName="ExpanderImage" Property="Source" Value="..\Images\Icons\32x32\Green\Close.png" />
                        </MultiDataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a treeview which contains, per node, a key and text. However, there
I have a treeview (winforms) which have different item types on it. I have
I have treeview and a context menu that is shown for every node. One
I have a TreeView showing an object's properties. One of the properties is a
I have a TreeView which has three levels. Lets say its a league, division
I have a TreeView control which displays two things: 1) Folder 2) Item Where
I have treeview and 2 imagelist first image list contains images only 42x42 and
I have a TreeView with a parent node and two children node. Each of
I have a TreeView that allows users to select certain elements of hierarchical data
I have a TreeView with binded ItemsSource. I want to select my root(first) node.

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.