skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class NotifyPropertyBase

Inheritance
System.Object
NotifyPropertyBase
FilterPredicate
ParameterValuePair
CellDefinition
GridGroupByField
GridViewSummaryItem
RowDefinition
RowTemplate
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.WinControls.Data
Assembly: Telerik.WinControls.dll

Syntax

public class NotifyPropertyBase : INotifyPropertyChangingEx, INotifyPropertyChanged

Constructors

NotifyPropertyBase()

Declaration
public NotifyPropertyBase()

Properties

IsSuspended

Declaration
public virtual bool IsSuspended { get; }
Property Value
System.Boolean

Methods

OnPropertyChanged(PropertyChangedEventArgs)

Raises the PropertyChanged event

Declaration
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
Parameters
System.ComponentModel.PropertyChangedEventArgs e

A System.ComponentModel.PropertyChangedEventArgs instance containing event data.

OnPropertyChanged(String)

Raises the PropertyChanged event

Declaration
protected void OnPropertyChanged(string propertyName)
Parameters
System.String propertyName

The name of the property

OnPropertyChanging(String)

Raises the PropertyChanging event

Declaration
protected bool OnPropertyChanging(string propertyName)
Parameters
System.String propertyName

The name of the property

Returns
System.Boolean

true if the event has been canceled, for more information see System.ComponentModel.CancelEventArgs.Cancel

OnPropertyChanging(String, Object, Object)

Raises the PropertyChanging event

Declaration
protected PropertyChangingEventArgsEx OnPropertyChanging(string propertyName, object originalValue, object value)
Parameters
System.String propertyName

The name of the property

System.Object originalValue

System.Object value

The value that is goint to be set to the property.

Returns
PropertyChangingEventArgsEx

OnPropertyChanging(PropertyChangingEventArgsEx)

Raises the PropertyChanging event. Note: This method is called even when the notifications are suspended.

Declaration
protected virtual void OnPropertyChanging(PropertyChangingEventArgsEx e)
Parameters
PropertyChangingEventArgsEx e

A PropertyChangingEventArgsEx instance containing event data.

ProcessPropertyChanged(PropertyChangedEventArgs)

This method is called right befor the PropertyChanged event is fired.

Declaration
protected virtual void ProcessPropertyChanged(PropertyChangedEventArgs e)
Parameters
System.ComponentModel.PropertyChangedEventArgs e

ProcessPropertyChanging(PropertyChangingEventArgsEx)

This method is called right before the PropertyChanging event is fired. Note: If IsSuspended is true, this method is not called.

Declaration
protected virtual void ProcessPropertyChanging(PropertyChangingEventArgsEx e)
Parameters
PropertyChangingEventArgsEx e

ResumeNotifications()

Declaration
public bool ResumeNotifications()
Returns
System.Boolean

ResumeNotifications(Boolean)

Declaration
public virtual bool ResumeNotifications(bool notifyChanges)
Parameters
System.Boolean notifyChanges

Returns
System.Boolean

SetProperty<T>(String, ref T, T)

General method for setting the value of the field related to the property that is modified. This method confirms that the old and new values are different, then fires the PropertyChanging event, then sets the given value to the supplied field, and fires the PropertyChanged event. Note: If the PropertyChanging event is canceled, the last two actions are not performed.

Declaration
protected virtual bool SetProperty<T>(string propertyName, ref T propertyField, T value)
Parameters
System.String propertyName

The name of the property, that will appear as propertyName in the PropertyChanging and PropertyChanged event args.

T propertyField

The field, that is related to the property.

T value

The value that is to be set to the field in case the PropertyChanging event is not being System.ComponentModel.CancelEventArgs.Cancel.

Returns
System.Boolean

true if new value is being set

Type Parameters
T

The type of the field that is to be modified.

Examples
public class MyNotificationsTest : NotifyPropertyBase
{
    private int myInt = 0;
    private int myInt2 = 0; //

    public int AsInt
    {
       get 
       { 
          return this.myField; 
       }
       set
       {
          if (SetProperty("AsInt", ref this.myInt, value))
          {
             // perform additional actions when new value is set to myInt.
          }
       }
    }

    public int AsInt2
    {
       get 
       { 
          return (float)this.myInt2; 
       }
       set
       {
          // The following property setter is the same as the previous one.
          if (this.myInt2 != value) 
          {
              PropertyChangingEventArgs2 ea = new PropertyChangingEventArgs2("AsInt2", value);
              OnPropertyChanging(ea);

              if (!ea.Cancel)
              {
                 this.myInt2 = (int)ea.Value;
                 OnPropertyChanged("AsInt2");

                 // perform additional actions when new value is set to myInt2.
              }
           }
       }
    }
}

SuspendNotifications()

Declaration
public virtual bool SuspendNotifications()
Returns
System.Boolean

Events

PropertyChanged

Occurs when a property of an object changes.

Declaration
public virtual event PropertyChangedEventHandler PropertyChanged
Event Type
System.ComponentModel.PropertyChangedEventHandler

PropertyChanging

Occurs before a property of an object changes.

Declaration
public virtual event PropertyChangingEventHandlerEx PropertyChanging
Event Type
PropertyChangingEventHandlerEx

Implements
INotifyPropertyChangingEx.PropertyChanging

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.