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
- MouseButton.cs
- FormatVersion.cs
- ErrorFormatter.cs
- MatrixUtil.cs
- ContractUtils.cs
- XmlUtil.cs
- TextServicesHost.cs
- RequestCachePolicy.cs
- XamlReaderHelper.cs
- PlaceHolder.cs
- OracleParameterBinding.cs
- UserPersonalizationStateInfo.cs
- DrawingDrawingContext.cs
- WindowsScrollBarBits.cs
- XmlChildEnumerator.cs
- ContainerControl.cs
- TagMapCollection.cs
- QueryCreatedEventArgs.cs
- AnnotationComponentManager.cs
- IndicFontClient.cs
- SortedSet.cs
- SessionState.cs
- RankException.cs
- RowSpanVector.cs
- InternalControlCollection.cs
- SelectedDatesCollection.cs
- UrlAuthFailedErrorFormatter.cs
- WebBrowserSiteBase.cs
- Rect.cs
- BaseUriHelper.cs
- XmlAttributeCollection.cs
- CriticalExceptions.cs
- ConfigXmlAttribute.cs
- RadialGradientBrush.cs
- EntityCommand.cs
- HorizontalAlignConverter.cs
- LayoutEngine.cs
- XmlSchemaSimpleContentExtension.cs
- Registry.cs
- PrivateFontCollection.cs
- CodePrimitiveExpression.cs
- ToolStripCollectionEditor.cs
- HtmlMeta.cs
- Selector.cs
- externdll.cs
- FacetValues.cs
- WebPageTraceListener.cs
- listviewsubitemcollectioneditor.cs
- TrailingSpaceComparer.cs
- LineInfo.cs
- TableLayoutPanelBehavior.cs
- PagerSettings.cs
- Normalization.cs
- SQLDateTime.cs
- SafeUserTokenHandle.cs
- WebPartChrome.cs
- ServiceHostingEnvironment.cs
- XsltConvert.cs
- StoreItemCollection.Loader.cs
- FixedSOMLineCollection.cs
- StylusPoint.cs
- Region.cs
- DependencyObjectProvider.cs
- FontCacheLogic.cs
- AttachmentService.cs
- GrammarBuilderBase.cs
- TreeNodeCollection.cs
- DSACryptoServiceProvider.cs
- DataErrorValidationRule.cs
- listitem.cs
- ConnectionInterfaceCollection.cs
- UserThread.cs
- ImageList.cs
- DataListGeneralPage.cs
- ListViewDeleteEventArgs.cs
- InternalTypeHelper.cs
- SqlConnectionPoolGroupProviderInfo.cs
- DataControlLinkButton.cs
- BuildProviderAppliesToAttribute.cs
- InternalTypeHelper.cs
- MultipartContentParser.cs
- NetNamedPipeSecurity.cs
- ByteAnimationBase.cs
- Border.cs
- RijndaelManaged.cs
- CodeDomDecompiler.cs
- VerificationException.cs
- DataSourceExpression.cs
- ipaddressinformationcollection.cs
- Convert.cs
- FrugalList.cs
- GlobalEventManager.cs
- NativeMethods.cs
- MetadataArtifactLoaderFile.cs
- ButtonRenderer.cs
- TreeViewItem.cs
- SessionStateSection.cs
- TreeNodeClickEventArgs.cs
- FileSystemWatcher.cs
- TypographyProperties.cs