Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- VisualTreeUtils.cs
- URLEditor.cs
- TextContainerChangeEventArgs.cs
- EventInfo.cs
- Compiler.cs
- GridViewPageEventArgs.cs
- JsonReader.cs
- BuilderPropertyEntry.cs
- EntityContainer.cs
- SafeSecurityHelper.cs
- XmlElement.cs
- DetailsViewRow.cs
- NumericPagerField.cs
- BaseParser.cs
- ToolStripDropDownClosedEventArgs.cs
- ScalarConstant.cs
- ThemeableAttribute.cs
- QuarticEase.cs
- AsymmetricKeyExchangeFormatter.cs
- NativeMethods.cs
- DataDocumentXPathNavigator.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- BindingList.cs
- InputScopeAttribute.cs
- TemplatePropertyEntry.cs
- SafePEFileHandle.cs
- OracleParameterBinding.cs
- TextRange.cs
- Rule.cs
- EmptyEnumerator.cs
- PinnedBufferMemoryStream.cs
- TextElement.cs
- NetCodeGroup.cs
- OpenTypeCommon.cs
- LinqDataSourceDeleteEventArgs.cs
- XmlSchemaNotation.cs
- AsymmetricSignatureFormatter.cs
- HttpBrowserCapabilitiesWrapper.cs
- ScopelessEnumAttribute.cs
- HtmlTableRowCollection.cs
- SortFieldComparer.cs
- formatter.cs
- Error.cs
- PrinterResolution.cs
- DataGridViewSelectedRowCollection.cs
- DetailsViewRow.cs
- WebPartCatalogCloseVerb.cs
- CompensatableTransactionScopeActivityDesigner.cs
- Int64Storage.cs
- X509Extension.cs
- ParallelTimeline.cs
- DocumentPaginator.cs
- RealizationDrawingContextWalker.cs
- DelegatingHeader.cs
- IsolatedStorageFile.cs
- CalendarDesigner.cs
- StylusPlugin.cs
- WebServiceErrorEvent.cs
- PermissionRequestEvidence.cs
- Schema.cs
- unitconverter.cs
- UrlMappingsModule.cs
- ResourceProperty.cs
- FrameDimension.cs
- TableItemStyle.cs
- LogReserveAndAppendState.cs
- DiscoveryClientChannelFactory.cs
- EventLogInternal.cs
- AliasedSlot.cs
- DataControlHelper.cs
- SafeLibraryHandle.cs
- AsymmetricSignatureDeformatter.cs
- MimeWriter.cs
- TypeConverters.cs
- SrgsText.cs
- SchemaTableColumn.cs
- RectAnimation.cs
- SecurityUniqueId.cs
- ItemCollection.cs
- PeerChannelListener.cs
- TransactionTraceIdentifier.cs
- Rect3DConverter.cs
- Tracking.cs
- SqlVersion.cs
- WebPartTransformerAttribute.cs
- RbTree.cs
- Cursors.cs
- ClipboardData.cs
- ExpressionPrinter.cs
- State.cs
- EntityWithKeyStrategy.cs
- EntityCommandDefinition.cs
- LoginCancelEventArgs.cs
- NamedObject.cs
- DataGrid.cs
- ActivationArguments.cs
- SystemIPGlobalStatistics.cs
- ScopelessEnumAttribute.cs
- VisemeEventArgs.cs
- ExecutionScope.cs