如何在代码隐藏中初始化PropertyChange? [英] How to initialize PropertyChange in code-behind?

查看:75
本文介绍了如何在代码隐藏中初始化PropertyChange?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我自己解决了这个问题。谢谢!

I've solved the problem myself. Thank you!

推荐答案

也许我没有正确理解你的问题但是没有这样的默认值。

正如解释的那样在这个 [ ^ ]文章,您将在代码中实现 PropertyChanged 方法。



您可以根据需要自定义它。

Perhaps I have not understood your question correctly but as such, there is no such default value.
Just as explained in this[^] article, you will implement the PropertyChanged method in your code.

You can customize it as you want.
// Create the OnPropertyChanged method to raise the event
protected void OnPropertyChanged(string name)
{
    PropertyChangedEventHandler handler = PropertyChanged;
    if (handler != null)
    {
        handler(this, new PropertyChangedEventArgs(name));
    }
}


这篇关于如何在代码隐藏中初始化PropertyChange?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆