Represents the method that will handle the PropertyChanged event. When building Windows Store apps with the Microsoft .NET Framework, this delegate is hidden and developers should use the System.ComponentModel.PropertyChangedEventHandler delegate.
Syntax
public delegate void PropertyChangedEventHandler( Object^ sender, PropertyChangedEventArgs e )
Attributes
- GuidAttribute("50f19c16-0a22-4d8e-a089-1ea9951657d2")
- VersionAttribute(NTDDI_WIN8)
- WebHostHiddenAttribute()
Parameters
- sender
-
Type: Object
The source of the event.
- e
-
Type: PropertyChangedEventArgs
Event data.
Remarks
When building Windows Store apps with the Framework, this delegate is hidden and developers should use the System.ComponentModel.PropertyChangedEventHandler delegate.
Examples
This example demonstrates how to implement the INotifyPropertyChanged interface and use PropertyChangedEventHandler. For the complete code listing, see the XAML data binding sample.
using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DataBinding { public class Employee : INotifyPropertyChanged { private string _name; private string _organization; public string Name { get { return _name; } set { _name = value; RaisePropertyChanged("Name"); } } public string Organization { get { return _organization; } set { _organization = value; RaisePropertyChanged("Organization"); } } public event PropertyChangedEventHandler PropertyChanged; protected void RaisePropertyChanged(string name) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(name)); } } } }
Requirements
|
Minimum supported client | Windows 8 |
|---|---|
|
Minimum supported server | Windows Server 2012 |
|
Namespace |
Windows::UI::Xaml::Data |
|
Metadata |
|
See also
Build date: 12/4/2012