Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Framework / System / Windows / RoutedPropertyChangedEventArgs.cs / 1 / RoutedPropertyChangedEventArgs.cs
using System; using System.Windows; using System.Windows.Input; // Disable CS3001, CS3003, CS3024: Warning as Error: not CLS-compliant #pragma warning disable 3001, 3003, 3024 namespace System.Windows { ////// This delegate must used by handlers of the RoutedPropertyChangedEvent event. /// /// The current element along the event's route. /// The event arguments containing additional information about the event. ///Nothing. public delegate void RoutedPropertyChangedEventHandler(object sender, RoutedPropertyChangedEventArgs e); /// /// This RoutedPropertyChangedEventArgs class contains old and new value when /// RoutedPropertyChangedEvent is raised. /// ////// public class RoutedPropertyChangedEventArgs : RoutedEventArgs { /// /// This is an instance constructor for the RoutedPropertyChangedEventArgs class. /// It is constructed with a reference to the event being raised. /// /// The old property value /// The new property value ///Nothing. public RoutedPropertyChangedEventArgs(T oldValue, T newValue) : base() { _oldValue = oldValue; _newValue = newValue; } ////// This is an instance constructor for the RoutedPropertyChangedEventArgs class. /// It is constructed with a reference to the event being raised. /// /// The old property value /// The new property value /// RoutedEvent ///Nothing. public RoutedPropertyChangedEventArgs(T oldValue, T newValue, RoutedEvent routedEvent) : this(oldValue, newValue) { RoutedEvent = routedEvent; } ////// Return the old value /// public T OldValue { get { return _oldValue; } } ////// Return the new value /// public T NewValue { get { return _newValue; } } ////// This method is used to perform the proper type casting in order to /// call the type-safe RoutedPropertyChangedEventHandler delegate for the IsCheckedChangedEvent event. /// /// The handler to invoke. /// The current object along the event's route. ///Nothing. ///protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget) { RoutedPropertyChangedEventHandler handler = (RoutedPropertyChangedEventHandler )genericHandler; handler(genericTarget, this); } private T _oldValue; private T _newValue; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.Windows; using System.Windows.Input; // Disable CS3001, CS3003, CS3024: Warning as Error: not CLS-compliant #pragma warning disable 3001, 3003, 3024 namespace System.Windows { /// /// This delegate must used by handlers of the RoutedPropertyChangedEvent event. /// /// The current element along the event's route. /// The event arguments containing additional information about the event. ///Nothing. public delegate void RoutedPropertyChangedEventHandler(object sender, RoutedPropertyChangedEventArgs e); /// /// This RoutedPropertyChangedEventArgs class contains old and new value when /// RoutedPropertyChangedEvent is raised. /// ////// public class RoutedPropertyChangedEventArgs : RoutedEventArgs { /// /// This is an instance constructor for the RoutedPropertyChangedEventArgs class. /// It is constructed with a reference to the event being raised. /// /// The old property value /// The new property value ///Nothing. public RoutedPropertyChangedEventArgs(T oldValue, T newValue) : base() { _oldValue = oldValue; _newValue = newValue; } ////// This is an instance constructor for the RoutedPropertyChangedEventArgs class. /// It is constructed with a reference to the event being raised. /// /// The old property value /// The new property value /// RoutedEvent ///Nothing. public RoutedPropertyChangedEventArgs(T oldValue, T newValue, RoutedEvent routedEvent) : this(oldValue, newValue) { RoutedEvent = routedEvent; } ////// Return the old value /// public T OldValue { get { return _oldValue; } } ////// Return the new value /// public T NewValue { get { return _newValue; } } ////// This method is used to perform the proper type casting in order to /// call the type-safe RoutedPropertyChangedEventHandler delegate for the IsCheckedChangedEvent event. /// /// The handler to invoke. /// The current object along the event's route. ///Nothing. ///protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget) { RoutedPropertyChangedEventHandler handler = (RoutedPropertyChangedEventHandler )genericHandler; handler(genericTarget, this); } private T _oldValue; private T _newValue; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- KeyedHashAlgorithm.cs
- CacheHelper.cs
- ArraySubsetEnumerator.cs
- ExtentCqlBlock.cs
- AesManaged.cs
- DateTimeUtil.cs
- ListItemCollection.cs
- XPathParser.cs
- RightsManagementLicense.cs
- DisposableCollectionWrapper.cs
- RoutedUICommand.cs
- Config.cs
- SqlGenerator.cs
- SectionVisual.cs
- ActivityCompletionCallbackWrapper.cs
- DataSourceNameHandler.cs
- SymmetricAlgorithm.cs
- StrokeNodeData.cs
- CqlWriter.cs
- XsdDateTime.cs
- ConnectionStringsSection.cs
- COM2IDispatchConverter.cs
- ExpandCollapseProviderWrapper.cs
- DataListItem.cs
- WebBodyFormatMessageProperty.cs
- AQNBuilder.cs
- PropertyToken.cs
- Point3DConverter.cs
- NamedPermissionSet.cs
- XPathNodeHelper.cs
- documentsequencetextview.cs
- ObjectViewListener.cs
- VBIdentifierTrimConverter.cs
- Triplet.cs
- PeerContact.cs
- UpdateEventArgs.cs
- ReferentialConstraint.cs
- Clipboard.cs
- ActivatableWorkflowsQueryResult.cs
- LinqDataSourceStatusEventArgs.cs
- MemberProjectionIndex.cs
- SqlXml.cs
- ConfigurationManagerInternal.cs
- SqlStream.cs
- EventItfInfo.cs
- MenuItem.cs
- FileChangeNotifier.cs
- EmptyImpersonationContext.cs
- StateManagedCollection.cs
- XmlILAnnotation.cs
- SchemeSettingElement.cs
- BindableTemplateBuilder.cs
- DockingAttribute.cs
- ConfigXmlComment.cs
- TranslateTransform3D.cs
- WebPartMovingEventArgs.cs
- TreeViewTemplateSelector.cs
- HttpClientChannel.cs
- DynamicUpdateCommand.cs
- FieldAccessException.cs
- ParagraphResult.cs
- QueryInterceptorAttribute.cs
- SerializationException.cs
- ShapeTypeface.cs
- DrawToolTipEventArgs.cs
- BitmapEffectGeneralTransform.cs
- Camera.cs
- ControlUtil.cs
- StylusPointCollection.cs
- OverrideMode.cs
- ChannelManager.cs
- IIS7UserPrincipal.cs
- RemoteWebConfigurationHost.cs
- Latin1Encoding.cs
- BitmapEffectInput.cs
- VisualProxy.cs
- ListViewDeletedEventArgs.cs
- Empty.cs
- TypeInitializationException.cs
- MTConfigUtil.cs
- CachedFontFamily.cs
- DateTimeSerializationSection.cs
- ByeOperation11AsyncResult.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- HtmlGenericControl.cs
- WinEventTracker.cs
- ScriptResourceAttribute.cs
- SplitterPanelDesigner.cs
- CellNormalizer.cs
- ViewPort3D.cs
- SQLInt32.cs
- CrossSiteScriptingValidation.cs
- ScrollBar.cs
- DataGridViewCellStateChangedEventArgs.cs
- ColorAnimationUsingKeyFrames.cs
- IdnMapping.cs
- ByteStreamMessageEncodingElement.cs
- Inline.cs
- MachineKeySection.cs
- DmlSqlGenerator.cs