IObservableModelElement 介面

代表公開屬性變更/已變更事件的 DSL 模型項目。

命名空間:  Microsoft.VisualStudio.SharePoint
組件:  Microsoft.VisualStudio.SharePoint (在 Microsoft.VisualStudio.SharePoint.dll 中)

語法

'宣告
Public Interface IObservableModelElement
public interface IObservableModelElement

IObservableModelElement 型別會公開下列成員。

事件

  名稱 說明
公用事件 PropertyChanged 發生於已變更 DSL 模型項目時。
公用事件 PropertyChanging 發生於正在變更 DSL 模型項目時。

回頁首

備註

DSL 模型項目透過其自訂屬性描述元支援屬性變更事件。

例如 WPF 資料繫結會使用這些模型項目。 不過,以程式設計方式使用時它們並不方便。 此外,如果 Visual Studio 支援「傳統」INotifyPropertyChangingINotifyPropertyChanged 介面,WPF 會偏好使用它們,而不會使用雙向繫結的屬性描述元,它們會因為不使用隱含交易而失敗。 因此,Visual Studio DSL 模型項目會實作傳統事件,而不實作介面本身。

請參閱

參考

Microsoft.VisualStudio.SharePoint 命名空間