locked
Syntax error on indentifier PropertyChangedEventArgs() ???

    Question

  • 	private: event Windows::UI::Xaml::Data::PropertyChangedEventHandler^ _privatePropertyChanged;
    
            protected:
               void OnPropertyChanged(Platform::String^ propertyName)
                {
                    if (_isPropertyChangedObserved)
                    {
    		Windows::UI::Xaml::Data::PropertyChangedEventArgs^ e;
    		e = ref new PropertyChangedEventArgs(propertyName);
                    _privatePropertyChanged(this, e);
                    }
                }

    Hi everybody, I get the error on the new PropertychangedEventArgs(). I dont understand this. I just give him the propertyName as String but what is he complaining about?

    --Pete

    Monday, November 18, 2013 6:57 PM

Answers


  • Do you have Windows::UI::Xaml::Data in your usings?

    Try explicitly newing Windows::UI::Xaml::Data::PropertyChangedEventArgs:

                    if (_isPropertyChangedObserved)
                    {
    		Windows::UI::Xaml::Data::PropertyChangedEventArgs^ e;
    		e = ref new Windows::UI::Xaml::Data::PropertyChangedEventArgs(propertyName);
                    _privatePropertyChanged(this, e);
                    }
    • Marked as answer by Peter Carl Tuesday, November 19, 2013 6:55 PM
    Monday, November 18, 2013 11:53 PM
    Owner

All replies


  • Do you have Windows::UI::Xaml::Data in your usings?

    Try explicitly newing Windows::UI::Xaml::Data::PropertyChangedEventArgs:

                    if (_isPropertyChangedObserved)
                    {
    		Windows::UI::Xaml::Data::PropertyChangedEventArgs^ e;
    		e = ref new Windows::UI::Xaml::Data::PropertyChangedEventArgs(propertyName);
                    _privatePropertyChanged(this, e);
                    }
    • Marked as answer by Peter Carl Tuesday, November 19, 2013 6:55 PM
    Monday, November 18, 2013 11:53 PM
    Owner
  • This helped! I thank u very much. unbelievable. What is goin on there... Woul absolutly not thought of that....

    Thanks again 

    -Pete

    Tuesday, November 19, 2013 6:54 PM