Note that there are some explanatory texts on larger screens.

plurals
  1. PODependency Property meta throws error when resolved by Unity
    primarykey
    data
    text
    <p>I have a presentationmodel(viewmodel) containing a dependencyy property registered as below..</p> <pre><code>public Field SelectedField { get { return (Field)GetValue(SelectedFieldProperty); } set { SetValue(SelectedFieldProperty, value); } } public static readonly DependencyProperty SelectedFieldProperty = DependencyProperty.Register("SelectedField", typeof(Field), typeof(PresentationModel), new PropertyMetadata(new PropertyChangedEventHandler(onPropertyChangedSelectedField))); private static void onPropertyChangedSelectedField(object sender, PropertyChangedEventArgs e) { throw new NotImplementedException(); } </code></pre> <p>I am resolving the view from a controller like below..</p> <pre><code> IPresentationModel presenter = this.Container.Resolve&lt;IPresentationModel&gt;(); </code></pre> <p>While trying to do, I am getting an error mentioning - Exception occurred while: Calling constructor PresentationModel, when digged in, I noticed that the error is occuring in the below line..</p> <pre><code>public static readonly DependencyProperty SelectedFieldProperty = DependencyProperty.Register("SelectedField", typeof(Field), typeof(PresentationModel), new PropertyMetadata(new PropertyChangedEventHandler(onPropertyChangedSelectedField))); </code></pre> <p>I Identified that the error is due to PropertyChangedEventHandler and DependencyPropertyChangedEventHandler when mentioned in propertymeta data, However, for PropertyChangedCallBack I don't face any error and view is loaded fine. What would be the problem in this..</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload