Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Style.cs
- XamlSerializationHelper.cs
- CorruptStoreException.cs
- ValidatingPropertiesEventArgs.cs
- MexBindingElement.cs
- TransformerConfigurationWizardBase.cs
- AsymmetricAlgorithm.cs
- CommandValueSerializer.cs
- WpfXamlType.cs
- ImageListStreamer.cs
- ProgressiveCrcCalculatingStream.cs
- SiteMapNodeCollection.cs
- BindStream.cs
- DashStyle.cs
- PerformanceCountersElement.cs
- ModelProperty.cs
- ConditionalExpression.cs
- HebrewNumber.cs
- TransportChannelListener.cs
- DesignerActionKeyboardBehavior.cs
- AuthenticationModeHelper.cs
- GenericIdentity.cs
- FileChangesMonitor.cs
- XmlLangPropertyAttribute.cs
- ModelServiceImpl.cs
- NetCodeGroup.cs
- TargetControlTypeCache.cs
- OleDbRowUpdatedEvent.cs
- XmlDataSourceDesigner.cs
- CompilationUtil.cs
- HitTestResult.cs
- BindingNavigator.cs
- ActivityTypeDesigner.xaml.cs
- OleDbConnection.cs
- DefaultValueConverter.cs
- GridLength.cs
- StylusPlugin.cs
- Light.cs
- SqlHelper.cs
- SemanticResultValue.cs
- FileLogRecordStream.cs
- TabItemAutomationPeer.cs
- TreeNodeStyleCollection.cs
- PrefixQName.cs
- ReadOnlyDictionary.cs
- IISMapPath.cs
- ProgressPage.cs
- CompilerState.cs
- TaiwanLunisolarCalendar.cs
- SamlSubjectStatement.cs
- DockProviderWrapper.cs
- ZipArchive.cs
- CatalogPartChrome.cs
- GestureRecognizer.cs
- _OSSOCK.cs
- ListMarkerLine.cs
- LabelLiteral.cs
- ObjectListShowCommandsEventArgs.cs
- SqlNodeTypeOperators.cs
- DBDataPermissionAttribute.cs
- FormViewInsertEventArgs.cs
- CancellationHandlerDesigner.cs
- ReferenceEqualityComparer.cs
- ErrorWrapper.cs
- MergeLocalizationDirectives.cs
- TextElementEditingBehaviorAttribute.cs
- MetafileEditor.cs
- EventLogPermissionHolder.cs
- GenericUriParser.cs
- ResourceAssociationSet.cs
- LogSwitch.cs
- hebrewshape.cs
- XamlSerializationHelper.cs
- DecimalAverageAggregationOperator.cs
- DeferredBinaryDeserializerExtension.cs
- LocalizationParserHooks.cs
- AuthenticationService.cs
- XmlReaderDelegator.cs
- ApplicationFileParser.cs
- FontFamily.cs
- UInt32Converter.cs
- MatrixAnimationUsingPath.cs
- PerformanceCounterTraceRecord.cs
- TypeBuilder.cs
- SQLDouble.cs
- SQLBytesStorage.cs
- DataGridViewTextBoxColumn.cs
- CookieParameter.cs
- IPPacketInformation.cs
- DataViewSetting.cs
- WebPartTransformer.cs
- MaskDesignerDialog.cs
- ThreadExceptionEvent.cs
- MessageFormatterConverter.cs
- CLSCompliantAttribute.cs
- BulletedListEventArgs.cs
- CollectionEditor.cs
- DesignerInterfaces.cs
- TraceHwndHost.cs
- MetadataCache.cs