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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:46:43+00:00 2026-06-01T15:46:43+00:00

I have created a custom collection class that I am trying to bind to

  • 0

I have created a custom collection class that I am trying to bind to two different treeviews in silverlight. The collection implements INotifyCollectionChanged and the type that the collection holds implements INotifyPropertyChanged. On the GUI is a DataGrid that sits between the two treeviews. This is an area where items can be dragged from the left treeview and manipulated. The changes are then reflected in the second treeview. The first treeview should only bind once and the second treeview should update whenever there is a change to the source. For some reason, however, OneTime binding on the first treeview doesn’t seem to work at all; the treeview still gets updated. Will OneTime binding work if a type implements INotifyCollectionChanged or INotifyPropertyChanged? The markup for the treeview that isn’t working correctly looks similar to this. I’ve removed a few details that are irrelevant to the issue. The DataContext of the treeview is set to a type called Client, for example, _tv.DataContext = client. Each client has a collection of plans and each plan in turn has a collection of allocations. I’m using a HierarchicalDataTemplate for the treeviews. Am I overlooking something? The INotifyPropertyChanged and INotifyCollectionChanged is implemented correctly. I don’t think it’s a logic issue.

<sdk:TreeView Name="_tv" ItemsSource="{Binding Plans, Mode=OneTime}">
  <sdk:TreeView.ItemTemplate>
    <sdk:HierarchicalDataTemplate ItemsSource="{Binding Allocations, Mode=OneTime}">
      <TextBlock Text="{Binding Name, Mode=OneTime}"/>
        <sdk:HierarchicalDataTemplate.ItemTemplate>
          <DataTemplate>
            <TextBlock>
              <Run Text="{Binding Fund.Allocations.Count}"></Run>
              <Run Text="{Binding Fund.Symbol}"></Run>
              <Run Text="{Binding Fund.Name}"></Run>
              <Run Text="{Binding Fund.AssetClass}"></Run>
            </TextBlock>
          </DataTemplate>
        </sdk:HierarchicalDataTemplate.ItemTemplate>
      </sdk:HierarchicalDataTemplate>
  </sdk:TreeView.ItemTemplate>
</sdk:TreeView>
  • 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-06-01T15:46:44+00:00Added an answer on June 1, 2026 at 3:46 pm

    The binding to Plans isn’t actually changing, since Plans isn’t actually changing. It is the contents of Plans that is changing, and thus the OneTime instruction won’t suppress the display of those changes.

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

Sidebar

Related Questions

I have a custom object that implements INotifyPropertyChanged. I have a collection of these
I have created a custom C# (4.0) class to be used in properties of
I have to develop a custom collection of objects. The reason is two fold,
I have a ObservableCollection which holds records of custom type Item. I use that
I have created a custom generic queue which implements a generic IQueue interface, which
I have created a custom module that creates a custom Database table. I have
The problem: I have a custom collection PagedList<T> that is being returned from my
In our web project, we have a custom Database Connection class that creates the
Lets say I have a custom data type that looks something like this: public
I have created custom MembershipUser, MembershipProvider and RolePrivoder classes. These all work and 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.