Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- IntranetCredentialPolicy.cs
- WindowsListViewGroupHelper.cs
- AccessorTable.cs
- ResourceCodeDomSerializer.cs
- URLMembershipCondition.cs
- TypeForwardedToAttribute.cs
- Environment.cs
- DynamicILGenerator.cs
- Padding.cs
- Application.cs
- QueryPageSettingsEventArgs.cs
- SR.cs
- ContentControl.cs
- CmsInterop.cs
- SrgsElementFactoryCompiler.cs
- WmlValidatorAdapter.cs
- PanelDesigner.cs
- ConnectionPoint.cs
- SafePipeHandle.cs
- ProfilePropertyMetadata.cs
- TextChangedEventArgs.cs
- State.cs
- VerticalAlignConverter.cs
- CodeAccessSecurityEngine.cs
- HitTestParameters.cs
- XmlEncoding.cs
- XmlAttributes.cs
- Canvas.cs
- HashSet.cs
- DbDataAdapter.cs
- LazyTextWriterCreator.cs
- BinHexEncoder.cs
- MenuEventArgs.cs
- ConstrainedDataObject.cs
- ScrollViewerAutomationPeer.cs
- XamlReader.cs
- IncrementalHitTester.cs
- DataGridViewButtonCell.cs
- DataServiceBehavior.cs
- ObjectRef.cs
- pingexception.cs
- SqlServices.cs
- WindowsFormsDesignerOptionService.cs
- IncrementalCompileAnalyzer.cs
- Metadata.cs
- ToolStripDropDownMenu.cs
- OleDbInfoMessageEvent.cs
- GridViewSelectEventArgs.cs
- ControlCachePolicy.cs
- BatchStream.cs
- ScrollChrome.cs
- FormsIdentity.cs
- MailAddressCollection.cs
- OpenFileDialog.cs
- InstanceNameConverter.cs
- ClientBuildManager.cs
- ResourceDictionaryCollection.cs
- MaskedTextBoxTextEditorDropDown.cs
- Parser.cs
- EndPoint.cs
- RelationshipType.cs
- MeasureData.cs
- SqlClientWrapperSmiStream.cs
- CharacterHit.cs
- XmlBinaryReader.cs
- ComboBoxItem.cs
- PropertyDescriptorComparer.cs
- ChannelDispatcherCollection.cs
- DesignerActionGlyph.cs
- XamlToRtfWriter.cs
- SortKey.cs
- PasswordRecovery.cs
- XappLauncher.cs
- LinkedResourceCollection.cs
- XmlSerializerSection.cs
- ExceptionUtil.cs
- RecordsAffectedEventArgs.cs
- Pen.cs
- mda.cs
- BackgroundWorker.cs
- DBSqlParserColumnCollection.cs
- AppSettingsExpressionBuilder.cs
- XmlSchemaChoice.cs
- APCustomTypeDescriptor.cs
- PropertyEmitterBase.cs
- XmlnsCompatibleWithAttribute.cs
- DataGridColumnCollection.cs
- BindingNavigator.cs
- Page.cs
- SerTrace.cs
- UrlMappingsModule.cs
- LogSwitch.cs
- CommandConverter.cs
- EnvironmentPermission.cs
- XmlSchemaCollection.cs
- SymDocumentType.cs
- ObjectStateManagerMetadata.cs
- CodeTypeReferenceExpression.cs
- HtmlSelect.cs
- CqlErrorHelper.cs