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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:58:11+00:00 2026-05-16T08:58:11+00:00

I have a label like this: <Label Name=LblUsersWithHair> <Binding Path=Users ElementName=ElementSelf Converter={StaticResource Converter_UsersWithHairPresenter} />

  • 0

I have a label like this:

<Label Name="LblUsersWithHair">
    <Binding Path="Users" 
             ElementName="ElementSelf" 
             Converter="{StaticResource Converter_UsersWithHairPresenter}" />
</Label>

And the converter:

…

public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
    var users = value as ObservableCollection<Users>;
    if (users == null) return null;

    var usersWithHair = users.Count(user => user.HasHair == true);
    return "There are " + usersWithHair + " there has hair.";
}

…

The problem is now that the label of course isn’t updated when the ‘HasHair’ property is changed, since the collection isn’t changed. But how do I force the label to rebind, when this property is set?

The example above is very simplified, but hope that you can help me… :o)

  • 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-16T08:58:12+00:00Added an answer on May 16, 2026 at 8:58 am

    Your Binding will only update, if the list fires a ListChanged-event. This does usually only occur on structural changes (add/remove/replace) in the list, not if a single list item changes – even if it does implement INotifyPropertyChanged.
    After you have implemented INotifyPropertyChanged for your item, you will still need to do one of the following two options:

    • Use a modified ObservableCollection, that listens to the PropertyChanged-Event of any item within (register on add/remove) and fires ListChanged on any Change.
    • Create a CollectionViewSource with a filter-predicate that evaluates HasHair, then bind your label to the item-count of this CollectionViewSource instead of the original list.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some HTML like this: <input type=radio class=MyRadio name=TheName> <label for=TheLabel>the text</label> How
I have a car-class like this: public class car { public String Name {get;
I have a nested model structure that looks like this: resources :users, :path =>
Suppose to have a code like this: <div class=notSelected> <label>Name <input type=text name=name id=name
I have a very simple contact form with fields like this: <label> First Name<em>*</em>
I have 3 tables Labels UserValues Users Labels looks like this: 1|First Name 2|Last
I have a markup like this: <label>First Name: <input type=text /></label> <label>Last Name: <input
i have a page layout like this <input id=name class=mandotary type=text> <label for=name>Name must
I have an image label created like this. Painter painter = new Painter() {
I have a ComboBox with a label function like this one: private function fieldLabelFunction(item:Object):String

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.