AutomationPropertyChangedEventArgs.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / UIAutomation / UIAutomationTypes / System / Windows / Automation / AutomationPropertyChangedEventArgs.cs / 1 / AutomationPropertyChangedEventArgs.cs

                            //---------------------------------------------------------------------------- 
//
// 
//    Copyright (C) Microsoft Corporation.  All rights reserved.
//  
//
// 
// Description: PropertyChanged event args class 
//
// History: 
//  06/17/2003 : BrendanM Ported to WCP
//
//---------------------------------------------------------------------------
 
using System;
using System.Windows.Automation; 
 
namespace System.Windows.Automation
{ 
    /// 
    /// Delegate to handle Automation Property change events
    /// 
#if (INTERNAL_COMPILE) 
    internal delegate void AutomationPropertyChangedEventHandler( object sender, AutomationPropertyChangedEventArgs e );
#else 
    public delegate void AutomationPropertyChangedEventHandler( object sender, AutomationPropertyChangedEventArgs e ); 
#endif
 
    /// 
    /// PropertyChanged event args class
    /// 
#if (INTERNAL_COMPILE) 
    internal sealed class AutomationPropertyChangedEventArgs : AutomationEventArgs
#else 
    public sealed class AutomationPropertyChangedEventArgs : AutomationEventArgs 
#endif
    { 
        //-----------------------------------------------------
        //
        //  Constructors
        // 
        //-----------------------------------------------------
 
        #region Constructors 

        ///  
        /// Constructor for PropertyChanged event args.
        /// 
        public AutomationPropertyChangedEventArgs(AutomationProperty property, object oldValue, object newValue)
            : base(AutomationElementIdentifiers.AutomationPropertyChangedEvent) 
        {
            _oldValue = oldValue; 
            _newValue = newValue; 
            _property = property;
        } 

        #endregion Constructors

 
        //------------------------------------------------------
        // 
        //  Public Properties 
        //
        //----------------------------------------------------- 

        #region Public Properties

        ///  
        /// Guid indicating which property changed.
        ///  
        public AutomationProperty Property 
        {
            get 
            {
                return _property;
            }
        } 

        ///  
        /// Old value of the property that changed 
        /// 
        public object OldValue 
        {
            get
            {
                return _oldValue; 
            }
        } 
 
        /// 
        /// New value of the property that changed 
        /// 
        public object NewValue
        {
            get 
            {
                return _newValue; 
            } 
        }
 
        #endregion Public Properties


        //------------------------------------------------------ 
        //
        //  Private Fields 
        // 
        //------------------------------------------------------
 
        #region Private Fields

        private AutomationProperty _property;
        private object _oldValue; 
        private object _newValue;
 
        #endregion Private Fields 
    }
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//---------------------------------------------------------------------------- 
//
// 
//    Copyright (C) Microsoft Corporation.  All rights reserved.
//  
//
// 
// Description: PropertyChanged event args class 
//
// History: 
//  06/17/2003 : BrendanM Ported to WCP
//
//---------------------------------------------------------------------------
 
using System;
using System.Windows.Automation; 
 
namespace System.Windows.Automation
{ 
    /// 
    /// Delegate to handle Automation Property change events
    /// 
#if (INTERNAL_COMPILE) 
    internal delegate void AutomationPropertyChangedEventHandler( object sender, AutomationPropertyChangedEventArgs e );
#else 
    public delegate void AutomationPropertyChangedEventHandler( object sender, AutomationPropertyChangedEventArgs e ); 
#endif
 
    /// 
    /// PropertyChanged event args class
    /// 
#if (INTERNAL_COMPILE) 
    internal sealed class AutomationPropertyChangedEventArgs : AutomationEventArgs
#else 
    public sealed class AutomationPropertyChangedEventArgs : AutomationEventArgs 
#endif
    { 
        //-----------------------------------------------------
        //
        //  Constructors
        // 
        //-----------------------------------------------------
 
        #region Constructors 

        ///  
        /// Constructor for PropertyChanged event args.
        /// 
        public AutomationPropertyChangedEventArgs(AutomationProperty property, object oldValue, object newValue)
            : base(AutomationElementIdentifiers.AutomationPropertyChangedEvent) 
        {
            _oldValue = oldValue; 
            _newValue = newValue; 
            _property = property;
        } 

        #endregion Constructors

 
        //------------------------------------------------------
        // 
        //  Public Properties 
        //
        //----------------------------------------------------- 

        #region Public Properties

        ///  
        /// Guid indicating which property changed.
        ///  
        public AutomationProperty Property 
        {
            get 
            {
                return _property;
            }
        } 

        ///  
        /// Old value of the property that changed 
        /// 
        public object OldValue 
        {
            get
            {
                return _oldValue; 
            }
        } 
 
        /// 
        /// New value of the property that changed 
        /// 
        public object NewValue
        {
            get 
            {
                return _newValue; 
            } 
        }
 
        #endregion Public Properties


        //------------------------------------------------------ 
        //
        //  Private Fields 
        // 
        //------------------------------------------------------
 
        #region Private Fields

        private AutomationProperty _property;
        private object _oldValue; 
        private object _newValue;
 
        #endregion Private Fields 
    }
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.

                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK