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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:39:57+00:00 2026-05-20T14:39:57+00:00

Apologies for not posting any code for this but all my efforts seem to

  • 0

Apologies for not posting any code for this but all my efforts seem to be going nowhere.

I need to get the name of an observableCollection a textblock is bound to from the mouseDown event handler, so I can then perform some operations on the data, is there any way to do this?

I have set the Tag of the textblock to {binding} so i get the entire object back the textblock is bound to. Other than this im not sure where to go next.

Update:

The reason for this is that I have 2 multiselect treeviews, with a heirarchial data template, each template shares the same treeview but is bound to a different observable collection.

The way my multiselect works is by applying a style to each treeview if the IsSelected value of that item in my collection is true.

Now I am using the Mousedown event handler for the textblock in my datatemplate to get the item I am working on, BUT some items can be in both collections at once. I need to know which item to set the IsSelected value on. Using Binding{tag} I get the Item I need to set on but not the collection it is within.

I’m using Mousedown as the event handler because If you click on one item to select it, then click again it needs to unselect and the treeview event handlers didnt seem to allow this to happen (SelectedItemChanged etc).

As a side note I also need to be able to hide the default selected style of the Treeview as this isnt used and it gets confusing.

  • 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-20T14:39:58+00:00Added an answer on May 20, 2026 at 2:39 pm

    You can’t determine what collection an item is in, but you can determine what TreeView the user clicked on. Then you can get the collection by knowing the TreeView, which should solve your immediate problem.

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

Sidebar

Related Questions

Apologies for cross posting (I asked this on the Silverlight Forum but got no
First and foremost, apologies for any cross-posting. Hope I'm not repeating an issue here,
Greetings, Apologies in advance that I have not researched this toughly enough to answer
Apologies for the long post, but I wonder if I could get some more
My apologies in advance for posting such a lengthy question. Believe it or not,
Apologies if this a newbish question, but I'm new to Mac programming, and thought
Apologies - am not good at SQL. Perhaps this is a simple query -
I could not think of a better way to title this question. my apologies
Apologies if any of what I'm about to say makes no sense or overlooks
Apologies in advance for the long-winded question. I'm really a database programmer, but have

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.