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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:41:44+00:00 2026-05-27T18:41:44+00:00

I’m getting an error when I run this code on the physical phone, but

  • 0

I’m getting an error when I run this code on the physical phone, but not on the emulator:

System.ArgumentException “The parameter is incorrect”

when I use the following code. This is a custom type I created to allow me to easily create types that can Bind to the View.

The exception is thrown on this line:

this.PropertyChanged(this, new PropertyChangedEventArgs("Value"));

This worked perfectly fine until I made it Generic:

public class BindableType<T> : INotifyPropertyChanged 
{
    public event PropertyChangedEventHandler PropertyChanged;
    private T _value;
    private T _previousValue;

    public T Value
    {
        get
        {
            return _value;
        }
        set
        {
            _previousValue = _value;
            _value = value;
            if (this.PropertyChanged != null)
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs("Value"));
            }
        }
    }

    public T PreviousValue
    {
        get { return _previousValue; }
    }
}

Here is the binding code:

Here is the stack trace:

at MS.Internal.XcpImports.CheckHResult(UInt32 hr) at
MS.Internal.XcpImports.SetValue(IManagedPeerBase obj,
DependencyProperty property, Double d) at
MS.Internal.XcpImports.SetValue(IManagedPeerBase doh,
DependencyProperty property, Object obj) at
System.Windows.DependencyObject.SetObjectValueToCore(DependencyProperty
dp, Object value) at
System.Windows.DependencyObject.SetEffectiveValue(DependencyProperty
property, EffectiveValueEntry& newEntry, Object newValue) at
System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty
property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry,
ValueOperation operation) at
System.Windows.DependencyObject.RefreshExpression(DependencyProperty
dp) at System.Windows.Data.BindingExpression.RefreshExpression()
at System.Windows.Data.BindingExpression.SendDataToTarget() at
System.Windows.Data.BindingExpression.SourcePropertyChanged(PropertyPathListener
sender, PropertyPathChangedEventArgs args) at
System.Windows.PropertyPathListener.RaisePropertyPathStepChanged(PropertyPathStep
source) at
System.Windows.PropertyAccessPathStep.RaisePropertyPathStepChanged(PropertyListener
source) at
System.Windows.CLRPropertyListener.SourcePropertyChanged(Object
sender, PropertyChangedEventArgs args) at
System.Windows.Data.WeakPropertyChangedListener.PropertyChangedCallback(Object
sender, PropertyChangedEventArgs args) at
RoadCast.Model.BindableType1.set_Value(Double value) at
RoadCast.Default.locationHelper_PositionChangedMinor(Object sender,
GeoPositionChangedEventArgs
1 args) at
RoadCast.Core.LocationHelper.watcher_PositionChanged(Object sender,
GeoPositionChangedEventArgs`1 e) at
System.Device.Location.GeoCoordinateWatcher.<>c_DisplayClass1.b_0(Object
_) at System.Reflection.RuntimeMethodInfo.InternalInvoke(RuntimeMethodInfo
rtmi, Object obj, BindingFlags invokeAttr, Binder binder, Object
parameters, CultureInfo culture, Boolean isBinderDefault, Assembly
caller, Boolean verifyAccess, StackCrawlMark& stackMark) at
System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters,
CultureInfo culture, StackCrawlMark& stackMark) at
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at System.Delegate.DynamicInvokeOne(Object[] args) at
System.MulticastDelegate.DynamicInvokeImpl(Object[] args) at
System.Delegate.DynamicInvoke(Object[] args) at
System.Windows.Threading.DispatcherOperation.Invoke() at
System.Windows.Threading.Dispatcher.Dispatch(DispatcherPriority
priority) at System.Windows.Threading.Dispatcher.OnInvoke(Object
context) at System.Windows.Hosting.CallbackCookie.Invoke(Object[]
args) at
System.Windows.Hosting.DelegateWrapper.InternalInvoke(Object[] args)
at System.Windows.RuntimeHost.ManagedHost.InvokeDelegate(IntPtr
pHandle, Int32 nParamCount, ScriptParam[] pParams, ScriptParam&
pResult)

UPDATE: Renaming the Property to “InternalValue” fixed this for me.

  • 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-27T18:41:45+00:00Added an answer on May 27, 2026 at 6:41 pm

    you need to initialize your PropertyChanged to this:

      public event PropertyChangedEventHandler PropertyChanged = delegate { };
    
    • 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 this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
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
I want to count how many characters a certain string has in PHP, but
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,
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
I need to clean up various Word 'smart' characters in user input, including but

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.