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
- EncryptedKeyIdentifierClause.cs
- FontWeightConverter.cs
- IssuedTokensHeader.cs
- SuppressIldasmAttribute.cs
- DESCryptoServiceProvider.cs
- XPathSingletonIterator.cs
- RbTree.cs
- _SslStream.cs
- PeerNameRecordCollection.cs
- CellIdBoolean.cs
- ComponentSerializationService.cs
- EntityDataSourceEntityTypeFilterItem.cs
- ConstructorNeedsTagAttribute.cs
- CreatingCookieEventArgs.cs
- JsonSerializer.cs
- ErrorHandler.cs
- OdbcInfoMessageEvent.cs
- EntityRecordInfo.cs
- ComplexBindingPropertiesAttribute.cs
- DataGridViewDataErrorEventArgs.cs
- MsmqIntegrationSecurityMode.cs
- HttpClientCertificate.cs
- ActivityBuilderXamlWriter.cs
- UserControlBuildProvider.cs
- ContextBase.cs
- ButtonBaseAutomationPeer.cs
- BamlRecords.cs
- UserUseLicenseDictionaryLoader.cs
- RIPEMD160Managed.cs
- GAC.cs
- DialogWindow.cs
- OleDbEnumerator.cs
- DataServiceConfiguration.cs
- TreeSet.cs
- ReadOnlyPropertyMetadata.cs
- DropDownButton.cs
- ConstraintConverter.cs
- UnSafeCharBuffer.cs
- OperatingSystem.cs
- WebPartMinimizeVerb.cs
- FrameAutomationPeer.cs
- OutputCacheSection.cs
- ForwardPositionQuery.cs
- ResourcePool.cs
- StorageAssociationSetMapping.cs
- APCustomTypeDescriptor.cs
- TrustManagerPromptUI.cs
- tibetanshape.cs
- SchemaImporterExtension.cs
- TextEffectCollection.cs
- EventWaitHandle.cs
- AuditLogLocation.cs
- Decoder.cs
- VariantWrapper.cs
- hwndwrapper.cs
- Constraint.cs
- TypeDelegator.cs
- LabelDesigner.cs
- Set.cs
- InteropBitmapSource.cs
- XPathItem.cs
- TemplateBamlTreeBuilder.cs
- SafeSecurityHandles.cs
- Activity.cs
- DrawListViewSubItemEventArgs.cs
- ProcessModelSection.cs
- ProtocolViolationException.cs
- ContainerActivationHelper.cs
- AttributeEmitter.cs
- WebBrowserUriTypeConverter.cs
- HttpCapabilitiesSectionHandler.cs
- PropertyInfoSet.cs
- MD5.cs
- SqlNotificationRequest.cs
- COMException.cs
- ByteStreamMessageUtility.cs
- PLINQETWProvider.cs
- DetailsViewModeEventArgs.cs
- FieldInfo.cs
- InputElement.cs
- Axis.cs
- DoubleLinkListEnumerator.cs
- TemplateControlCodeDomTreeGenerator.cs
- LoadRetryHandler.cs
- WebPartConnectVerb.cs
- QueryValue.cs
- RightsManagementUser.cs
- EntityException.cs
- WindowsSysHeader.cs
- Constraint.cs
- Error.cs
- JournalNavigationScope.cs
- DatePickerTextBox.cs
- OLEDB_Util.cs
- MessageDecoder.cs
- BaseDataList.cs
- SqlDataSourceQueryEditorForm.cs
- ConfigsHelper.cs
- ObjectConverter.cs
- DeflateEmulationStream.cs