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
- FunctionQuery.cs
- ChannelFactory.cs
- TransactionFlowOption.cs
- GenericIdentity.cs
- SvcFileManager.cs
- ProcessModelInfo.cs
- WebWorkflowRole.cs
- Icon.cs
- LogEntrySerializer.cs
- Storyboard.cs
- View.cs
- RemoteArgument.cs
- StrongTypingException.cs
- Variant.cs
- HotCommands.cs
- NamespaceEmitter.cs
- SingleStorage.cs
- MatrixAnimationUsingPath.cs
- SectionInformation.cs
- RuntimeConfig.cs
- WebCategoryAttribute.cs
- ReplyChannelBinder.cs
- CodeGen.cs
- XPathAncestorQuery.cs
- CompilationLock.cs
- XpsFixedDocumentReaderWriter.cs
- DbParameterHelper.cs
- ConfigurationPermission.cs
- SingleQueryOperator.cs
- SymmetricSecurityBindingElement.cs
- HMACRIPEMD160.cs
- SqlDataSourceQueryEditor.cs
- XmlSchemaValidator.cs
- EventLogConfiguration.cs
- Helpers.cs
- BoundPropertyEntry.cs
- DictionaryContent.cs
- XmlWriter.cs
- CommandLibraryHelper.cs
- ContentPresenter.cs
- XPathDescendantIterator.cs
- TTSEngineTypes.cs
- MachinePropertyVariants.cs
- DebugTracing.cs
- TargetParameterCountException.cs
- PointAnimationUsingPath.cs
- BitmapEncoder.cs
- Buffer.cs
- FileDialog_Vista_Interop.cs
- HasCopySemanticsAttribute.cs
- MetafileHeaderWmf.cs
- XmlDataDocument.cs
- BoundPropertyEntry.cs
- HtmlInputReset.cs
- HttpClientCertificate.cs
- Page.cs
- EnumUnknown.cs
- OracleRowUpdatingEventArgs.cs
- OutputCacheSettings.cs
- SchemaInfo.cs
- MemberRelationshipService.cs
- ItemDragEvent.cs
- RequestTimeoutManager.cs
- MexTcpBindingElement.cs
- MenuItem.cs
- TrackingSection.cs
- DataPagerCommandEventArgs.cs
- PromptEventArgs.cs
- TogglePattern.cs
- CodeTypeReferenceExpression.cs
- XmlSignatureManifest.cs
- TextStore.cs
- UnsafeNativeMethods.cs
- SQLMoney.cs
- ClickablePoint.cs
- ToolZone.cs
- InteropBitmapSource.cs
- StringFreezingAttribute.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- Comparer.cs
- ChildTable.cs
- CodeTypeDeclaration.cs
- OuterGlowBitmapEffect.cs
- TargetParameterCountException.cs
- ExpressionBinding.cs
- XPathAxisIterator.cs
- LabelLiteral.cs
- ProtocolsConfiguration.cs
- Pair.cs
- BigInt.cs
- TaiwanLunisolarCalendar.cs
- ThicknessAnimationBase.cs
- BuildManagerHost.cs
- PowerModeChangedEventArgs.cs
- FormatException.cs
- SqlDataSourceView.cs
- SortExpressionBuilder.cs
- ObjectMaterializedEventArgs.cs
- ActivityCollectionMarkupSerializer.cs
- TargetException.cs