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
- ObjectAssociationEndMapping.cs
- ClientSponsor.cs
- ListViewUpdateEventArgs.cs
- XmlBinaryReader.cs
- StorageMappingFragment.cs
- ViewStateException.cs
- InputManager.cs
- GACIdentityPermission.cs
- SqlTriggerContext.cs
- PeerEndPoint.cs
- relpropertyhelper.cs
- SpecularMaterial.cs
- SqlWorkflowPersistenceService.cs
- XmlSchemaCompilationSettings.cs
- COM2Properties.cs
- OperationSelectorBehavior.cs
- GeometryCollection.cs
- XmlElement.cs
- DllNotFoundException.cs
- GcSettings.cs
- __ComObject.cs
- SqlDataSourceView.cs
- UntypedNullExpression.cs
- ElapsedEventArgs.cs
- HandlerFactoryWrapper.cs
- MergeLocalizationDirectives.cs
- ZipIOLocalFileDataDescriptor.cs
- TypeLibConverter.cs
- ProfileSettings.cs
- DocumentViewerAutomationPeer.cs
- CompiledELinqQueryState.cs
- WebUtil.cs
- WSTrust.cs
- Transform3D.cs
- SinglePageViewer.cs
- SoundPlayerAction.cs
- DSASignatureDeformatter.cs
- FixedSOMFixedBlock.cs
- XmlNodeComparer.cs
- Variable.cs
- SerializationFieldInfo.cs
- MergeFilterQuery.cs
- LinqDataSourceSelectEventArgs.cs
- BitSet.cs
- DisplayNameAttribute.cs
- Rijndael.cs
- HttpDictionary.cs
- SchemaMerger.cs
- XmlIlVisitor.cs
- ContentPlaceHolder.cs
- WebPartUserCapability.cs
- DocumentSequence.cs
- MetafileHeader.cs
- InProcStateClientManager.cs
- ThrowHelper.cs
- WindowsProgressbar.cs
- NetworkStream.cs
- ValidationErrorCollection.cs
- MailWebEventProvider.cs
- BitmapEffectCollection.cs
- Vector3DAnimationUsingKeyFrames.cs
- MulticastOption.cs
- BindableTemplateBuilder.cs
- SqlCachedBuffer.cs
- TemplateNameScope.cs
- MultipleViewPatternIdentifiers.cs
- BridgeDataRecord.cs
- SvcMapFileSerializer.cs
- TextSelectionHelper.cs
- DependencyPropertyHelper.cs
- TypeResolver.cs
- Transactions.cs
- InternalDispatchObject.cs
- SecurityManager.cs
- ErrorTableItemStyle.cs
- LookupNode.cs
- PropertyPath.cs
- ObjectDataSourceChooseTypePanel.cs
- MessageUtil.cs
- RichTextBox.cs
- HitTestWithGeometryDrawingContextWalker.cs
- ScriptResourceInfo.cs
- odbcmetadatacollectionnames.cs
- ColumnCollection.cs
- SourceSwitch.cs
- UnsafeNativeMethods.cs
- IUnknownConstantAttribute.cs
- ProviderManager.cs
- ButtonRenderer.cs
- FunctionUpdateCommand.cs
- EventNotify.cs
- ToolStripItemRenderEventArgs.cs
- CodeDirectionExpression.cs
- SmuggledIUnknown.cs
- FixUpCollection.cs
- GetPageNumberCompletedEventArgs.cs
- IIS7UserPrincipal.cs
- XPathChildIterator.cs
- TranslateTransform.cs
- SHA1Managed.cs