WPF MVVM OnPropertyChanged 已定义但未在其他视图模型上显示

WPF MVVM OnPropertyChanged defined but not showing on other View Models

伙计们。我正在实现一个 MVVM 代码。我正在使用福迪。我成功创建了 BaseViewModel,如下所示:

using System.ComponentModel;
namespace GProject_MVVM.ViewModel
{
    /// <summary>
    /// A base view model that fires Property Changed events as needed
    /// </summary>

    public class BaseViewModel : INotifyPropertyChanged
    {
        /// <summary>
        /// The event that is fired when any child property changes its value
        /// </summary>
        public event PropertyChangedEventHandler PropertyChanged = (sender, e) => { };
        /// <summary>
        /// Call this to fire <see cref="PropertyChanged"/> event
        /// </summary>
        /// <param name="name"></param>
        public void OnPropertyChanged(string name)
        {
            PropertyChanged(this, new PropertyChangedEventArgs(name));
        }
    }
}

没问题,但是当我在 WindowViewModel 上调用它时,出现 OnPropertyChanged Not Defined 错误 这是我的 WindowViewModel

using System.Windows;

namespace GProject_MVVM.ViewModel
{
    /// <summary>
    /// THe View Model for Custom Flat Windows
    /// </summary>
    class WindowsViewModel
    {

        #region Private Member

        #endregion

        #region Public Properties


        #endregion

        #region Constructor
        // Default Constructor
        public WindowsViewModel(Window window)
        {
            mWindow = window;
            //Listen out for the window resizing
            mWindow.StateChanged += (sender, e) =>
            {
                OnPropertyChanged(nameof(ResizeBorderThickness)); // I got error here
            };

        }
        #endregion
    }
}

WindowsViewModel 需要从 BaseViewModel 继承 才能访问其成员

public class WindowsViewModel : BaseViewModel {
    //...
}