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

The Archive Base Latest Questions

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

I’m creating an application with a weather map that shows the heat as a

  • 0

I’m creating an application with a weather map that shows the heat as a Pushpin at different places. To do this, supplied by own PushpinModel that supports the INotifyPropertyChanged interface:

public class PushpinModel: INotifyPropertyChanged
    {
        #region // events
        public event PropertyChangedEventHandler PropertyChanged;
        #endregion events

        #region // fields
        Heat heat = Heat.normal;
        #endregion fields

        #region // properties
        public string Placename { get; set; }
        public GeoCoordinate Location { get; set; }
        public Heat Heat 
        {
            get { return heat; }
            set
            {
                if (heat != value)
                {
                    heat = value;
                    OnPropertyChanged("Heat"); 
                }
            }
        }
        public string IDno { get; set; }
        #endregion  properties

        #region // handlers
        protected virtual void OnPropertyChanged(string propChanged)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(propChanged));
        }
        #endregion  handlers
    }

The PushpinModel objects are contained in an ObservableCollection called Pushpins which are periodically updated to ShowWeather:

public class Pushpins: ObservableCollection<PushpinModel>
    {

        #region // METHODS
        public void ShowWeather( WeatherReport fromWeatherReport)
        {
            foreach (WeatherRecord w in fromWeatherReport.WeatherRecords)
            {
                    this.First<PushpinModel>(p => p.IDno == w.PlaceID).Heat = w.Heat;
            }
        }
        #endregion methods
    }

I display the Pushpins on a Bing Map, but also as items in an ItemsControl:

 <ItemsControl x:Name="ItemList" ItemsSource="{Binding Source={StaticResource placesSortedAndFiltered}}">
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <Border>
                                    <TextBlock Text="{Binding Placename}" />
                                </Border>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>

The ItemsSource is defined as a CollectionViewSource:

<CollectionViewSource  x:Key="placesSortedAndFiltered" Source="{Binding ElementName=MyMainPage, Path=Pushpins}" Filter="PlaceHeat_Filter">
    <CollectionViewSource.SortDescriptions>
        <componentmodel:SortDescription PropertyName="Placename" Direction="Ascending" />
    </CollectionViewSource.SortDescriptions>
</CollectionViewSource>

with a Filter in the codebehind defined as:

 private void PlaceHeat_Filter(object sender, FilterEventArgs e)
        {
            e.Accepted = (((PushpinModel)e.Item).Heat != Heat.na);

        }

where a public enum Heat {na,cool,normal,warm,hot}

The problem is that ItemsControl list display appropriately sorted and filtered on page load, but does NOT update when the PushpinModel objects properties are changed. Please note that when the Pushpins object is bound to a Bing Map Control, the PushpinModel objects do update as expected. So somehow, my ItemsControl list isn’t updating even though it is bound via a CollectionView to an ObservableCollection

  • 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-30T09:59:05+00:00Added an answer on May 30, 2026 at 9:59 am

    I believe that the CollectionViewSource implementation only supports automatic filtering when the underlying collection is changed (or reset). The filter does not get invoked if a property of an underlying data item changes.

    You could either call Refresh() on the CollectionViewSource when a property for an item in the collection changes, or you could implement your own CollectionViewSource which listens to property changed events on underlying data objects, or you could bind directly to a filtered (and sorted) collection rather than using the CollectionViewSource.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
Does anyone know how can I replace this 2 symbol below from the 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.