zoukankan      html  css  js  c++  java
  • Data Binding Notifications绑定通知 GIS

    The standard way for a View Model to serve as a binding source is by implementing the INotifyPropertyChanged interface defined in the System.ComponentModel namespace. This interface has an exceptionally simple definition:
    public interface INotifyPropertyChanged { event PropertyChangedEventHandler PropertyChanged; }
    The PropertyChangedEventHandler delegate is associated with the PropertyChangedEventArgs class, which defines one property: PropertyName of type string. When a class implements INotifyPropertyChanged, it fires a PropertyChanged event whenever one of its properties changes.

    public class SimpleViewModel : INotifyPropertyChanged

    { double totalScore;

    public event PropertyChangedEventHandler PropertyChanged;

    public double TotalScore

    {

    set { if (totalScore != value)

    {

    totalScore = value;

    if (PropertyChanged != null)

    PropertyChanged(this, new PropertyChangedEventArgs("TotalScore"));

    }

    }

    get { return totalScore; }

    }

    }

  • 相关阅读:
    数论——欧拉函数
    数论——最大公约数
    Python——循环
    数论——素数和反素数
    数论——快速幂剖析
    Perfect Keyboard
    HTML学习笔记Day6
    HTML学习笔记Day5
    HTML学习笔记Day4
    HTML学习笔记Day3
  • 原文地址:https://www.cnblogs.com/gisbeginner/p/2670431.html
Copyright © 2011-2022 走看看