Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- FrameworkReadOnlyPropertyMetadata.cs
- MarkupExtensionReturnTypeAttribute.cs
- Switch.cs
- SettingsBindableAttribute.cs
- KoreanCalendar.cs
- RotateTransform.cs
- FileDialog_Vista_Interop.cs
- HScrollProperties.cs
- BindingExpressionUncommonField.cs
- ContainerUtilities.cs
- CodeDOMUtility.cs
- Pts.cs
- MouseWheelEventArgs.cs
- LassoSelectionBehavior.cs
- TreeView.cs
- InstanceDataCollectionCollection.cs
- HtmlUtf8RawTextWriter.cs
- TypeLoadException.cs
- TextHidden.cs
- DefaultParameterValueAttribute.cs
- ModelFactory.cs
- RelationshipEndCollection.cs
- ExtendedProperty.cs
- WorkflowApplicationTerminatedException.cs
- ArrayConverter.cs
- ClientBuildManagerCallback.cs
- ArrangedElement.cs
- EventLogPropertySelector.cs
- UnsafeNativeMethods.cs
- RsaElement.cs
- Helper.cs
- XmlLanguage.cs
- Documentation.cs
- ObjectStateEntry.cs
- ActivityCollectionMarkupSerializer.cs
- Internal.cs
- SQlBooleanStorage.cs
- StatusBarItem.cs
- Encoder.cs
- UrlPropertyAttribute.cs
- NodeCounter.cs
- HtmlButton.cs
- documentsequencetextpointer.cs
- DeferredSelectedIndexReference.cs
- DispatcherExceptionEventArgs.cs
- CalendarSelectionChangedEventArgs.cs
- ListBoxItem.cs
- SafeNativeMethodsOther.cs
- ReceiveActivityDesignerTheme.cs
- PtsPage.cs
- GradientStop.cs
- Int32RectValueSerializer.cs
- RevocationPoint.cs
- CodeTypeDelegate.cs
- CodeVariableDeclarationStatement.cs
- documentsequencetextcontainer.cs
- XmlDataCollection.cs
- RootBrowserWindowAutomationPeer.cs
- ArgIterator.cs
- EventProviderClassic.cs
- IsolatedStorageSecurityState.cs
- OleDbWrapper.cs
- SiteOfOriginContainer.cs
- DataSourceProvider.cs
- AbandonedMutexException.cs
- ShaderEffect.cs
- StaticResourceExtension.cs
- CustomTypeDescriptor.cs
- LayoutEngine.cs
- MD5CryptoServiceProvider.cs
- XmlEntity.cs
- OdbcConnectionHandle.cs
- AppDomainProtocolHandler.cs
- TextSpanModifier.cs
- FastPropertyAccessor.cs
- WindowsStartMenu.cs
- coordinatorfactory.cs
- MenuItem.cs
- BulletedList.cs
- InfiniteIntConverter.cs
- Int64Storage.cs
- FixedSOMPage.cs
- IFormattable.cs
- RegexTypeEditor.cs
- SystemTcpStatistics.cs
- OdbcUtils.cs
- PersonalizationProvider.cs
- SafeHandles.cs
- SecureEnvironment.cs
- XamlToRtfWriter.cs
- WebPartPersonalization.cs
- EventLogger.cs
- PingOptions.cs
- MessageHeaders.cs
- recordstatefactory.cs
- IBuiltInEvidence.cs
- DefinitionBase.cs
- WorkflowApplicationTerminatedException.cs
- ClientSettingsStore.cs
- MSHTMLHost.cs