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
- Compress.cs
- OutputCacheSettings.cs
- SimpleParser.cs
- OpCopier.cs
- DataBindingExpressionBuilder.cs
- CodeBlockBuilder.cs
- PathTooLongException.cs
- SizeAnimation.cs
- BehaviorService.cs
- SoapAttributeAttribute.cs
- HtmlFormWrapper.cs
- IssuedTokensHeader.cs
- TrueReadOnlyCollection.cs
- ScriptManagerProxy.cs
- SslStream.cs
- ToolStripSystemRenderer.cs
- XmlFormatExtensionPrefixAttribute.cs
- LinkButton.cs
- VisualStyleTypesAndProperties.cs
- SelectionRange.cs
- HttpFileCollection.cs
- BasicKeyConstraint.cs
- XPathBinder.cs
- JsonStringDataContract.cs
- SiteMembershipCondition.cs
- XmlNodeReader.cs
- ProcessRequestAsyncResult.cs
- ObjectTag.cs
- DbResourceAllocator.cs
- StrongNameMembershipCondition.cs
- StrokeCollection.cs
- StrokeRenderer.cs
- BrushMappingModeValidation.cs
- ClientRoleProvider.cs
- ContentWrapperAttribute.cs
- ListViewEditEventArgs.cs
- WorkflowServiceAttributesTypeConverter.cs
- FixedSOMPageElement.cs
- RoleProviderPrincipal.cs
- CheckBox.cs
- InkCanvasSelection.cs
- OrCondition.cs
- SqlReorderer.cs
- DependencyObjectProvider.cs
- PrintPageEvent.cs
- GraphicsContainer.cs
- Calendar.cs
- StringValidatorAttribute.cs
- CssClassPropertyAttribute.cs
- NamespaceCollection.cs
- FileDataSource.cs
- Trigger.cs
- QueryStringParameter.cs
- PathSegment.cs
- SwitchElementsCollection.cs
- ToolStripRenderer.cs
- UserControlParser.cs
- SelectionListComponentEditor.cs
- SchemaCollectionCompiler.cs
- ObjectViewEntityCollectionData.cs
- ObjectStateFormatter.cs
- OdbcError.cs
- EncoderNLS.cs
- VariableExpressionConverter.cs
- EndOfStreamException.cs
- Roles.cs
- HttpCapabilitiesBase.cs
- IsolatedStorageException.cs
- CommonObjectSecurity.cs
- ImageMetadata.cs
- CompModSwitches.cs
- DataBindingCollection.cs
- CacheVirtualItemsEvent.cs
- RegexParser.cs
- TypeBuilder.cs
- ResourceManager.cs
- RunWorkerCompletedEventArgs.cs
- RequestUriProcessor.cs
- ToolStripOverflowButton.cs
- MergePropertyDescriptor.cs
- FlowDocumentPaginator.cs
- TypeUsage.cs
- DataBoundControl.cs
- GenericTypeParameterBuilder.cs
- ConstructorBuilder.cs
- SessionPageStateSection.cs
- invalidudtexception.cs
- mediaeventshelper.cs
- HtmlControl.cs
- BinaryWriter.cs
- BinaryParser.cs
- PocoPropertyAccessorStrategy.cs
- ObjRef.cs
- ClientSideProviderDescription.cs
- _Connection.cs
- DataTablePropertyDescriptor.cs
- Group.cs
- HttpProtocolImporter.cs
- OLEDB_Util.cs
- ViewEventArgs.cs