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
- HttpCookie.cs
- XmlElement.cs
- UnsafeNativeMethodsMilCoreApi.cs
- FieldBuilder.cs
- GetWinFXPath.cs
- EntityDataSourceDesigner.cs
- ValidatorAttribute.cs
- WebBrowser.cs
- WebBrowserUriTypeConverter.cs
- TextEditorSelection.cs
- ManagedFilter.cs
- DateTimeFormatInfoScanner.cs
- ListView.cs
- ClientSettingsSection.cs
- ImageInfo.cs
- RotationValidation.cs
- HttpCookiesSection.cs
- SafeHandles.cs
- KeyValuePairs.cs
- FSWPathEditor.cs
- WebPartConnectionsEventArgs.cs
- DashStyle.cs
- FileDataSourceCache.cs
- File.cs
- BitmapCodecInfo.cs
- safex509handles.cs
- TemplateBaseAction.cs
- SQLUtility.cs
- FilteredXmlReader.cs
- DbMetaDataCollectionNames.cs
- MessageQueuePermissionEntryCollection.cs
- UnconditionalPolicy.cs
- PrinterSettings.cs
- ConfigurationStrings.cs
- ViewCellRelation.cs
- Models.cs
- WebPartCancelEventArgs.cs
- ClientRolePrincipal.cs
- DocumentOrderComparer.cs
- XmlDictionaryString.cs
- PolicyValidationException.cs
- sqlcontext.cs
- ImageMap.cs
- Selection.cs
- UndoEngine.cs
- HeaderedContentControl.cs
- ContextMenu.cs
- ConfigXmlText.cs
- WebEncodingValidatorAttribute.cs
- Point4D.cs
- ViewValidator.cs
- XPathNodeHelper.cs
- CommandManager.cs
- SmiXetterAccessMap.cs
- ProfileModule.cs
- VirtualizingStackPanel.cs
- XmlConvert.cs
- WebBrowserHelper.cs
- SqlClientWrapperSmiStreamChars.cs
- DataRelationCollection.cs
- InheritablePropertyChangeInfo.cs
- WindowsRegion.cs
- ValidatorCompatibilityHelper.cs
- ClientFormsIdentity.cs
- DefaultExpression.cs
- WhereQueryOperator.cs
- LineServices.cs
- ProjectionCamera.cs
- TemplateInstanceAttribute.cs
- GeometryModel3D.cs
- CacheRequest.cs
- StylusPointProperties.cs
- TypePresenter.xaml.cs
- DataGridViewCellFormattingEventArgs.cs
- OdbcPermission.cs
- XmlSerializerSection.cs
- ArgumentValue.cs
- KeyNotFoundException.cs
- DependsOnAttribute.cs
- AutomationPropertyInfo.cs
- CollectionsUtil.cs
- IPipelineRuntime.cs
- AddInAttribute.cs
- EventRecordWrittenEventArgs.cs
- SimplePropertyEntry.cs
- Comparer.cs
- DynamicFilter.cs
- ObjectManager.cs
- SharedPersonalizationStateInfo.cs
- CatalogZoneAutoFormat.cs
- EntityConnectionStringBuilder.cs
- Aggregates.cs
- FloatUtil.cs
- UnsafeNativeMethods.cs
- AsymmetricSignatureFormatter.cs
- XmlObjectSerializerReadContext.cs
- Int64Storage.cs
- Module.cs
- WCFBuildProvider.cs
- MultipartContentParser.cs