Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / RoutedPropertyChangedEventArgs.cs / 1305600 / 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
- ScaleTransform3D.cs
- BinaryCommonClasses.cs
- SingleObjectCollection.cs
- GridItem.cs
- Triangle.cs
- SqlLiftIndependentRowExpressions.cs
- AQNBuilder.cs
- ClientUtils.cs
- Matrix3DValueSerializer.cs
- AssertValidation.cs
- InkPresenter.cs
- ConfigurationLocation.cs
- EmptyQuery.cs
- TreeNodeConverter.cs
- EntityConnection.cs
- DbDataReader.cs
- _SpnDictionary.cs
- ProfessionalColorTable.cs
- ActiveDocumentEvent.cs
- XmlIlTypeHelper.cs
- SQlBooleanStorage.cs
- LabelAutomationPeer.cs
- HttpProtocolReflector.cs
- DataGridViewIntLinkedList.cs
- HtmlForm.cs
- ModulesEntry.cs
- ACE.cs
- ConnectionConsumerAttribute.cs
- XmlDataSource.cs
- WebPartsSection.cs
- StylusButtonEventArgs.cs
- EventHandlingScope.cs
- SingletonChannelAcceptor.cs
- ShaderRenderModeValidation.cs
- base64Transforms.cs
- RuleInfoComparer.cs
- AuthenticateEventArgs.cs
- HandledEventArgs.cs
- Exceptions.cs
- ResourceType.cs
- ExpressionContext.cs
- DisplayMemberTemplateSelector.cs
- login.cs
- CodeSubDirectoriesCollection.cs
- NativeMethods.cs
- TcpActivation.cs
- ZipIOCentralDirectoryBlock.cs
- DataPagerField.cs
- RunWorkerCompletedEventArgs.cs
- BackgroundWorker.cs
- ConditionalWeakTable.cs
- ScriptReferenceBase.cs
- ToolStripStatusLabel.cs
- MSAANativeProvider.cs
- StaticTextPointer.cs
- TripleDESCryptoServiceProvider.cs
- FilteredAttributeCollection.cs
- SynthesizerStateChangedEventArgs.cs
- EntityStoreSchemaFilterEntry.cs
- AxisAngleRotation3D.cs
- ListViewItemMouseHoverEvent.cs
- ProfileEventArgs.cs
- SamlAction.cs
- TypeBrowserDialog.cs
- SafeCryptHandles.cs
- ContextDataSourceView.cs
- Opcode.cs
- lengthconverter.cs
- InvalidCastException.cs
- TransformPattern.cs
- DependencyPropertyHelper.cs
- OleDbError.cs
- RoutedPropertyChangedEventArgs.cs
- UnsafePeerToPeerMethods.cs
- DashStyle.cs
- ScrollData.cs
- regiisutil.cs
- ConfigDefinitionUpdates.cs
- XmlSchemaAny.cs
- EnlistmentTraceIdentifier.cs
- Calendar.cs
- ControlParameter.cs
- WsatConfiguration.cs
- HostUtils.cs
- CachingHintValidation.cs
- StylusShape.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- errorpatternmatcher.cs
- ReadOnlyTernaryTree.cs
- WebPartMovingEventArgs.cs
- FixedDocumentPaginator.cs
- ExpressionBinding.cs
- ToolStripManager.cs
- HtmlInputCheckBox.cs
- AssemblyAttributesGoHere.cs
- GenerateTemporaryTargetAssembly.cs
- Profiler.cs
- HtmlControlAdapter.cs
- FormParameter.cs
- ModelVisual3D.cs