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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:15:57+00:00 2026-06-09T22:15:57+00:00

I’m using a map from Esri, which offers a feature where you can bind

  • 0

I’m using a map from Esri, which offers a feature where you can bind a collection to the map, and it does all the magic for plotting and rendering graphic points. It just requires that the object has some properties to bind to, as shown below:

<esri:PointDataSource
         ItemsSource="{Binding Path=PlottedData, Source={StaticResource ViewModel}, Mode=TwoWay}"
         XCoordinateBinding="{Binding X}"
         YCoordinateBinding="{Binding Y}"
         IsSelectedBinding="{Binding IsSelected, Mode=TwoWay}">

My application, of course, requires more data than just those points, and there are different types too. This lead us to make subclasses of DataPoint for all of the different types, and then pass them through such that the map wouldn’t be the wiser.

I had this working wonderfully in a demo application without the subclasses, but when I incorporate this into the application, and start receiving data from the services as a subclass, the IsSelected functionality stops working. I can confirm that the IsSelected properties on all of the points is being toggled when expected, but when i toggle them, they aren’t reflected back onto the map. To clarify, if I replace the service results with this AFTER they’re returned to the model:

var returned = new ObservableCollection<DataPoint>()
    {
        new DataPoint(){IsPlottable = true, IsSelected = false, X = 722762, Y = 488253},
        new DataPoint(){IsSelected = false, X = 810000, Y = 550000, IsPlottable = true},
        new DataPoint(){IsSelected = false, X = 801000, Y = 480000, IsPlottable = true},
        new DataPoint(){IsSelected = false, X = 800100, Y = 500000, IsPlottable = true},
        new DataPoint(){IsSelected = false, X = 800010, Y = 506000, IsPlottable = true}
    };

then it works. WhenI then replace that with this:

var returned = new ObservableCollection<DataPoint>()
    {
        new DataPointSubclass(){IsPlottable = true, IsSelected = false, X = 722762, Y = 488253},
        new DataPointSubclass(){IsSelected = false, X = 810000, Y = 550000, IsPlottable = true},
        new DataPointSubclass(){IsSelected = true, X = 801000, Y = 480000, IsPlottable = true},
        new DataPointSubclass(){IsSelected = false, X = 800100, Y = 500000, IsPlottable = true},
        new DataPointSubclass(){IsSelected = true, X = 800010, Y = 506000, IsPlottable = true}
    };

it stops working. Meanwhile, the points are plotted correctly–so I know that the binding is working at least when the bound collection is created (notice how the subclass above has some IsSelected = true; that binds right initially too).

What about my inheritence implementation might be causing the binding from basically switch from one/two-way binding to one-time binding? Could I be misattributing the issue?

EDIT: Thanks to comments below, I’ve narrowed it down to PropertyChange event handler being null whenever IsSelected is set. For clarity, here is where I define the public member of IsSelected in the base class:

    [DataMember]
    public bool IsSelected
    {
        get { return _IsSelected; }
        set
        {
            if (_IsSelected != value)
            {
                _IsSelected = value;
                if (PropertyChanged != null)
                    PropertyChanged(this, new PropertyChangedEventArgs("IsSelected"));
            }
        }
    }

In my demo app, where everything works, and if I use the first set of dummy points above (which work), PropertyChanged is not null, and the setter raises the PropertyChanged event.

When using a DataPointSubclass, however, PropertyChanged is always null (but the setter is being triggered). What could I be missing here?

  • 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-09T22:15:59+00:00Added an answer on June 9, 2026 at 10:15 pm

    The is one of those situations where my tools got in the way.

    I have a base class that implements INotifyPropertyChanged server side. My service returns a collection of objects which are a subclass of it. Since its a subclass, my client needs access to the base-class. To solve this problem, I Add as Link a file client-side which really exists server-side. That way, when I update service references, a partial class is generated client-side (in references.cs) which looks a bit like this:

    public partial class DataPointSubclass: Application.Server.Data.SharedCode.DataPoint, INotifyPropertyChanged { }
    

    Its a pretty cool feature, except that it implements INotifyPropertyChanged, even though DataPoint also implements it. This is a big no-no, and was the root of all my problems. When you re-implement INPC on a subclass (at least, without overwriting the base class’ property), PropertyChanged will always be null in the base class. In this case, the service reference automatically implemented INotifyPropertyChanged without checking if its base class already implemented it.

    Solution: You have to disable this feature in References.svcmap. Look for this property and set it to false:

    <EnableDataBinding>true</EnableDataBinding>
    

    You can find References.svcmap by showing all files in solution explorer, and looking in your server references tree.

    By doing this, classes automatically generated by updating your services references wont implement INotifyPropertyChanged automatically. If you want to have that functionality, you would presumably have to implement it manually.

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

Sidebar

Related Questions

I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't

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.