Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Input / Command / ExecutedRoutedEventArgs.cs / 1305600 / 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
- CriticalFinalizerObject.cs
- SQLResource.cs
- DBConnectionString.cs
- WindowAutomationPeer.cs
- EdmSchemaError.cs
- AudienceUriMode.cs
- OciLobLocator.cs
- QuaternionAnimation.cs
- ServerIdentity.cs
- TextTreeInsertElementUndoUnit.cs
- XmlElementCollection.cs
- _PooledStream.cs
- StructuralType.cs
- TypeResolvingOptions.cs
- ToolStripPanelRenderEventArgs.cs
- ConsumerConnectionPoint.cs
- EndpointInstanceProvider.cs
- NetCodeGroup.cs
- UshortList2.cs
- Vector3D.cs
- Debug.cs
- X509CertificateCollection.cs
- XmlNamespaceManager.cs
- ColorInterpolationModeValidation.cs
- FullTrustAssemblyCollection.cs
- PrimitiveOperationFormatter.cs
- Region.cs
- PersonalizationProvider.cs
- SmiConnection.cs
- DBDataPermissionAttribute.cs
- DoubleConverter.cs
- Point3DConverter.cs
- ObservableCollectionDefaultValueFactory.cs
- StoryFragments.cs
- Application.cs
- StartUpEventArgs.cs
- UnauthorizedWebPart.cs
- CalendarAutomationPeer.cs
- DataException.cs
- SecureConversationSecurityTokenParameters.cs
- GuidelineCollection.cs
- Listener.cs
- FilterException.cs
- TypefaceCollection.cs
- XmlWriter.cs
- XhtmlBasicImageAdapter.cs
- WebZone.cs
- TreeIterator.cs
- ChineseLunisolarCalendar.cs
- ValidatedControlConverter.cs
- NullRuntimeConfig.cs
- PointF.cs
- Collection.cs
- LogicalExpressionEditor.cs
- WebPartExportVerb.cs
- SerialErrors.cs
- WebPartEditorOkVerb.cs
- PeerTransportSecuritySettings.cs
- PolicyChain.cs
- ExpressionBuilder.cs
- DataSourceControlBuilder.cs
- WebPartHelpVerb.cs
- DataServiceRequest.cs
- DataKeyCollection.cs
- HtmlInputImage.cs
- WebPartCatalogCloseVerb.cs
- HashHelper.cs
- SoapElementAttribute.cs
- SingleTagSectionHandler.cs
- TextBlock.cs
- FactoryGenerator.cs
- ClientScriptManagerWrapper.cs
- RowsCopiedEventArgs.cs
- MessageAction.cs
- APCustomTypeDescriptor.cs
- DeferredTextReference.cs
- DataGridHeaderBorder.cs
- DataGridBoolColumn.cs
- SystemIPGlobalStatistics.cs
- TraceUtility.cs
- EndpointAddressAugust2004.cs
- TransformGroup.cs
- HyperLinkDesigner.cs
- GC.cs
- UnaryOperationBinder.cs
- NegatedCellConstant.cs
- SoapAttributeAttribute.cs
- BCLDebug.cs
- DataSourceSelectArguments.cs
- VirtualizingStackPanel.cs
- XmlSchemaDocumentation.cs
- XmlSchema.cs
- NonBatchDirectoryCompiler.cs
- StylusEventArgs.cs
- TypeUsageBuilder.cs
- DesignerActionItemCollection.cs
- HttpRawResponse.cs
- FormViewPageEventArgs.cs
- ViewBase.cs
- ImageKeyConverter.cs