Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / System / Windows / Input / Command / ExecutedRoutedEventArgs.cs / 1 / ExecutedRoutedEventArgs.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Windows; using System.Windows.Input; namespace System.Windows.Input { ////// Event handler for the Executed events. /// public delegate void ExecutedRoutedEventHandler(object sender, ExecutedRoutedEventArgs e); ////// Event arguments for the Executed events. /// public sealed class ExecutedRoutedEventArgs : RoutedEventArgs { #region Constructor ////// Initializes a new instance of this class. /// /// The command that is being executed. /// The parameter that was passed when executing the command. internal ExecutedRoutedEventArgs(ICommand command, object parameter) { if (command == null) { throw new ArgumentNullException("command"); } _command = command; _parameter = parameter; } #endregion #region Public Properties ////// The command being executed. /// public ICommand Command { get { return _command; } } ////// The parameter passed when executing the command. /// public object Parameter { get { return _parameter; } } #endregion #region Protected Methods ////// Calls the handler. /// /// Handler delegate to invoke /// Target element protected override void InvokeEventHandler(Delegate genericHandler, object target) { ExecutedRoutedEventHandler handler = (ExecutedRoutedEventHandler)genericHandler; handler(target as DependencyObject, this); } #endregion #region Data private ICommand _command; private object _parameter; #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Windows; using System.Windows.Input; namespace System.Windows.Input { ////// Event handler for the Executed events. /// public delegate void ExecutedRoutedEventHandler(object sender, ExecutedRoutedEventArgs e); ////// Event arguments for the Executed events. /// public sealed class ExecutedRoutedEventArgs : RoutedEventArgs { #region Constructor ////// Initializes a new instance of this class. /// /// The command that is being executed. /// The parameter that was passed when executing the command. internal ExecutedRoutedEventArgs(ICommand command, object parameter) { if (command == null) { throw new ArgumentNullException("command"); } _command = command; _parameter = parameter; } #endregion #region Public Properties ////// The command being executed. /// public ICommand Command { get { return _command; } } ////// The parameter passed when executing the command. /// public object Parameter { get { return _parameter; } } #endregion #region Protected Methods ////// Calls the handler. /// /// Handler delegate to invoke /// Target element protected override void InvokeEventHandler(Delegate genericHandler, object target) { ExecutedRoutedEventHandler handler = (ExecutedRoutedEventHandler)genericHandler; handler(target as DependencyObject, this); } #endregion #region Data private ICommand _command; private object _parameter; #endregion } } // 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
- DetailsViewInsertEventArgs.cs
- Pen.cs
- PointAnimationClockResource.cs
- TakeOrSkipQueryOperator.cs
- sqlstateclientmanager.cs
- HttpListenerContext.cs
- PreloadedPackages.cs
- MediaPlayerState.cs
- PointAnimationBase.cs
- Geometry.cs
- EventLogStatus.cs
- RemoteWebConfigurationHostServer.cs
- IncrementalReadDecoders.cs
- IApplicationTrustManager.cs
- CollectionViewSource.cs
- SqlRowUpdatedEvent.cs
- Compilation.cs
- SqlLiftWhereClauses.cs
- UserControlParser.cs
- MulticastIPAddressInformationCollection.cs
- AddInProcess.cs
- RoleManagerModule.cs
- DataGridTableCollection.cs
- ListDataBindEventArgs.cs
- Cursor.cs
- DataGridViewRowCollection.cs
- ZoneIdentityPermission.cs
- SQLInt64Storage.cs
- Resources.Designer.cs
- ApplicationContext.cs
- ImageAttributes.cs
- OdbcUtils.cs
- Soap.cs
- FixedDSBuilder.cs
- ModelChangedEventArgsImpl.cs
- StyleSheet.cs
- SourceItem.cs
- XamlFigureLengthSerializer.cs
- SafeSystemMetrics.cs
- Range.cs
- SocketInformation.cs
- CodeGenerationManager.cs
- QueryCreatedEventArgs.cs
- ConfigurationSectionGroupCollection.cs
- CustomAttribute.cs
- PeerToPeerException.cs
- FileDialog_Vista_Interop.cs
- TrackBarRenderer.cs
- TargetInvocationException.cs
- ByteFacetDescriptionElement.cs
- ModelItemCollection.cs
- ColumnHeaderConverter.cs
- ConfigXmlAttribute.cs
- UrlMapping.cs
- MimeTypePropertyAttribute.cs
- UpdateManifestForBrowserApplication.cs
- Keywords.cs
- Journaling.cs
- _NegoState.cs
- BasicHttpBindingCollectionElement.cs
- StrongTypingException.cs
- CorrelationRequestContext.cs
- AsymmetricKeyExchangeDeformatter.cs
- MethodBody.cs
- MimeWriter.cs
- GeneralTransform.cs
- HashLookup.cs
- StreamResourceInfo.cs
- TextRunProperties.cs
- XmlSchemaAttributeGroup.cs
- DocComment.cs
- TemplateApplicationHelper.cs
- NoResizeSelectionBorderGlyph.cs
- Stack.cs
- XpsSerializationManagerAsync.cs
- MsmqIntegrationBindingElement.cs
- RoutedEvent.cs
- WithStatement.cs
- Shared.cs
- CapabilitiesPattern.cs
- WindowsListViewScroll.cs
- SchemaManager.cs
- IndividualDeviceConfig.cs
- formatter.cs
- EasingKeyFrames.cs
- SqlFormatter.cs
- XpsS0ValidatingLoader.cs
- SingleObjectCollection.cs
- EntityDataSourceWrapper.cs
- TrackingLocation.cs
- FixedSOMGroup.cs
- CodePageUtils.cs
- ObjectCloneHelper.cs
- WebBrowser.cs
- SamlNameIdentifierClaimResource.cs
- BooleanStorage.cs
- FontEmbeddingManager.cs
- AssemblyHash.cs
- MembershipValidatePasswordEventArgs.cs
- ContentTextAutomationPeer.cs