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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:22:59+00:00 2026-05-26T13:22:59+00:00

I’m getting a e.PropertyChanged error saying there’s no exstension method and no definition. I’m

  • 0

I’m getting a e.PropertyChanged error saying there’s no exstension method and no definition. I’m new to this kind of material so I’m not how to handle this. I’m trying to make a property that will be used to let the user select different months to view on a calender.

The error occurs in this:

    void MyViewModel_PropertyChanged(object src, PropertyChangedEventArgs e)
    {
        //error below for PropertyChanged
        if (e.PropertyChanged = "NameofMonth")
        {
            var date = new DateTime(2011, NameofMonth, 1);
            //LoadMonth(date);
        }
    }

—Heres the full two classes that its working with———

public class Schedule : INotifyPropertyChanged
{               
    public event PropertyChangedEventHandler PropertyChanged;    
    public void NotifyPropertyChanged(String info)
    {
        if (PropertyChanged != null)
        {
            PropertyChanged(this, new PropertyChangedEventArgs(info));
        }
    }
    private int MonthofYear = 6;
    public int NameofMonth
    {
        get
        {
            return this.MonthofYear;
        }
        set
        {
            if (value != this.MonthofYear)
            {
                this.MonthofYear = value;
                NotifyPropertyChanged("NameofMonth");
            }
        }
    }

   // public void UpdateCal(PropertyChangedEventArgs e)
   // {
    //    if (PropertyChanged != null)
    //        PropertyChanged(this, e);
  //  } 
    public string MonthWeek { get; set; }
    public string Year { get; set; }
    public string Month { get; set; }
    public string day { get; set; }
    public string WeekOfYear { get; set; }
    public string dayofweek { get; set; }                
    private int _weekno;
    public int WeekNo { 
        get { return _weekno; }            
        set
        {
             if (Equals(_weekno, value)) return;
            _weekno = value;
            NotifyPropertyChanged("WeekNo");
        }
    }
    private int _weekday ;
    public int WeekDay
    {
        get { return _weekday; }
        set
        {
            if (Equals(_weekday, value)) return;
            _weekday = value;
            NotifyPropertyChanged("WeekDay");
        }
    }        
    public Schedule()
    {
        PropertyChanged += MyViewModel_PropertyChanged;
    }

    void MyViewModel_PropertyChanged(object src, PropertyChangedEventArgs e)
    {

        if (e.PropertyChanged = "NameofMonth")
        {
            var date = new DateTime(2011, NameofMonth, 1);
            //LoadMonth(date);
        }
    }

——the viewmodel class———-

public partial class SchedulePage : Page 
{
    public int pick2;
     public event PropertyChangedEventHandler PropertyChanged;
    MainWindow _parentForm;
    public int pick;
    Schedule sched = new Schedule();         
    static GregorianCalendar _gc = new GregorianCalendar();

   public SchedulePage(MainWindow parentForm)
   {
        InitializeComponent();
      //  sched.PropertyChanged += MyViewModel_PropertyChanged;            
        sched.NameofMonth = comboMonth.SelectedIndex;
        pick = Convert.ToInt32(comboMonth.SelectedItem);
        _parentForm = parentForm;                   
    }
       private void button1_Click(object sender, RoutedEventArgs e)
       {
           _parentForm.bindings.schedule.Clear();
           var t = new List<Schedule>();
           DateTime curr = DateTime.Now;
           int jeez = listMe.SelectedIndex;
           //  comboMonth.Items.Add(curr.Month);
           DateTime newcurr = new DateTime(2011, jeez+1, 1);
           //   pickdate = datePickercal.SelectedDate;
           //  DateTime newcurr = new DateTime(curr.Year, curr.Month, 1);
           var cal = System.Globalization.DateTimeFormatInfo.CurrentInfo.Calendar;
           var ms = cal.GetWeekOfYear(new DateTime(newcurr.Year, newcurr.Month, 1), System.Globalization.CalendarWeekRule.FirstDay, System.DayOfWeek.Sunday);
           for (var i = 1; newcurr.Month == jeez+1; newcurr = newcurr.AddDays(1))
           {

               var month_week = (newcurr.Day / 7);
               sched.MonthWeek = newcurr.GetWeekOfMonth().ToString();
               sched.Month = newcurr.Month.ToString();
               sched.Year = newcurr.Year.ToString();
               sched.day = newcurr.Day.ToString();
               sched.WeekOfYear = cal.GetWeekOfYear(newcurr, System.Globalization.CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString();
               sched.dayofweek = newcurr.DayOfWeek.ToString();
               t.Add(sched);

               _parentForm.bindings.schedule.Add(new Schedule { WeekNo = newcurr.GetWeekOfMonth() - 1, WeekDay = (int)newcurr.DayOfWeek, day = newcurr.Day.ToString() });

           }
           lblDate.Content = (newcurr.Month - 1) + "/" + newcurr.Year;
           //testGrid.ItemsSource = t;
           comboMonth.DataContext = _parentForm.bindings;
           DataContext = _parentForm.bindings;

       }
   }
}
  • 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-26T13:23:00+00:00Added an answer on May 26, 2026 at 1:23 pm
    1. That is an assignment (e.PropertyChanged = "NameofMonth"), you probably want ==.

    2. As the warning correctly states there is no such property, see the docs. What you want is PropertyChangedEventArgs.PropertyName.

    • 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
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
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
this is what i have right now Drawing an RSS feed into the php,
I want use html5's new tag to play a wav file (currently only supported
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
I need a function that will clean a strings' special characters. I do NOT

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.