Bagikan melalui


NotifyPropertyChangedDispatcherObject.SetAndRaisePropertyChanged<T> Method (T%, T, String)

A helper method that sets property value and raises PropertyChanged event if the value has changed.

Namespace:  Microsoft.TeamFoundation.MVVM
Assembly:  Microsoft.TeamFoundation.Controls (in Microsoft.TeamFoundation.Controls.dll)

Syntax

'Declaration
Protected Function SetAndRaisePropertyChanged(Of T) ( _
    ByRef propertyDataField As T, _
    value As T, _
    propertyName As String _
) As Boolean
protected bool SetAndRaisePropertyChanged<T>(
    ref T propertyDataField,
    T value,
    string propertyName
)
protected:
generic<typename T>
bool SetAndRaisePropertyChanged(
    T% propertyDataField, 
    T value, 
    String^ propertyName
)
member SetAndRaisePropertyChanged : 
        propertyDataField:'T byref * 
        value:'T * 
        propertyName:string -> bool
JScript does not support generic types or methods.

Type Parameters

  • T

Parameters

  • propertyDataField
    Type: T%

    A reference to the data member which is used to store property value.

  • value
    Type: T

    New property value.

Return Value

Type: System.Boolean
True if the property value has changed, false otherwise.

.NET Framework Security

See Also

Reference

NotifyPropertyChangedDispatcherObject Class

SetAndRaisePropertyChanged Overload

Microsoft.TeamFoundation.MVVM Namespace