Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- MenuScrollingVisibilityConverter.cs
- TextServicesDisplayAttribute.cs
- WebBrowsableAttribute.cs
- BindUriHelper.cs
- SelectionRangeConverter.cs
- SafeCloseHandleCritical.cs
- TripleDESCryptoServiceProvider.cs
- ContractComponent.cs
- ChtmlTextWriter.cs
- StrokeNodeOperations.cs
- ToolStripItemClickedEventArgs.cs
- ServiceAuthorizationBehavior.cs
- ToolStripProgressBar.cs
- BinaryReader.cs
- WindowsGraphics.cs
- SubclassTypeValidatorAttribute.cs
- ConfigXmlComment.cs
- KeyValuePair.cs
- HttpDictionary.cs
- HtmlTernaryTree.cs
- MessageQueueInstaller.cs
- PropertyChangedEventManager.cs
- UshortList2.cs
- CryptoApi.cs
- ReferenceAssemblyAttribute.cs
- DbDataSourceEnumerator.cs
- TextBox.cs
- PropertyGeneratedEventArgs.cs
- PathData.cs
- Viewport3DAutomationPeer.cs
- ProjectionCamera.cs
- EntityKeyElement.cs
- SqlInternalConnectionSmi.cs
- ClientScriptManager.cs
- XmlBinaryWriter.cs
- GeometryModel3D.cs
- HtmlGenericControl.cs
- EncoderNLS.cs
- HoistedLocals.cs
- ImageCodecInfoPrivate.cs
- SplitContainer.cs
- OracleLob.cs
- SchemaMerger.cs
- StrongNamePublicKeyBlob.cs
- QuaternionAnimation.cs
- PointAnimationUsingPath.cs
- CngKeyCreationParameters.cs
- EntityDataSourceSelectingEventArgs.cs
- InvokeMethodActivityDesigner.cs
- WebBrowserPermission.cs
- MsmqReceiveHelper.cs
- XmlNullResolver.cs
- TypeLoader.cs
- ObjectListItem.cs
- FrameworkElement.cs
- IssuanceTokenProviderBase.cs
- RowUpdatedEventArgs.cs
- FileStream.cs
- PopupEventArgs.cs
- ToolStripItemEventArgs.cs
- ReadOnlyCollection.cs
- InvalidCastException.cs
- keycontainerpermission.cs
- ClockController.cs
- FormsAuthenticationConfiguration.cs
- ZipPackagePart.cs
- GrammarBuilderWildcard.cs
- RootProfilePropertySettingsCollection.cs
- ApplicationServiceManager.cs
- TrackingCondition.cs
- SqlInternalConnectionTds.cs
- XappLauncher.cs
- TextSelectionHighlightLayer.cs
- DateTimeOffsetAdapter.cs
- SecurityTokenSerializer.cs
- OleDbEnumerator.cs
- SessionParameter.cs
- TypeDescriptor.cs
- Exceptions.cs
- SqlCharStream.cs
- ClientTargetSection.cs
- ConfigXmlReader.cs
- _HeaderInfoTable.cs
- WebPartConnection.cs
- TimeEnumHelper.cs
- SmtpMail.cs
- PrinterUnitConvert.cs
- XmlSchemaObjectCollection.cs
- Version.cs
- BaseAddressPrefixFilterElementCollection.cs
- Site.cs
- DownloadProgressEventArgs.cs
- SymDocumentType.cs
- StylusPointDescription.cs
- ColumnPropertiesGroup.cs
- ItemsControl.cs
- ValueOfAction.cs
- OutputCacheProfile.cs
- invalidudtexception.cs
- SimpleApplicationHost.cs