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
- CompiledQueryCacheEntry.cs
- SqlVisitor.cs
- BuildDependencySet.cs
- Rect.cs
- CancelEventArgs.cs
- SequenceDesigner.cs
- OperationSelectorBehavior.cs
- CacheChildrenQuery.cs
- StylusPointPropertyInfo.cs
- BaseCAMarshaler.cs
- Semaphore.cs
- AdornerDecorator.cs
- ColorContext.cs
- ConnectorMovedEventArgs.cs
- BaseInfoTable.cs
- RegexBoyerMoore.cs
- CodeTypeParameter.cs
- ProtectedConfigurationProviderCollection.cs
- GridItemProviderWrapper.cs
- XPathDescendantIterator.cs
- SelectionHighlightInfo.cs
- FocusTracker.cs
- DataColumnCollection.cs
- DbProviderSpecificTypePropertyAttribute.cs
- XmlArrayAttribute.cs
- SendKeys.cs
- CodeSnippetCompileUnit.cs
- NumericUpDownAcceleration.cs
- WebServicesInteroperability.cs
- processwaithandle.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- URL.cs
- Base64Encoder.cs
- TypeUtil.cs
- ImmutableObjectAttribute.cs
- StringSorter.cs
- ReadOnlyAttribute.cs
- TextComposition.cs
- DetailsViewInsertedEventArgs.cs
- ExplicitDiscriminatorMap.cs
- BuildDependencySet.cs
- glyphs.cs
- XsltCompileContext.cs
- GridViewRowEventArgs.cs
- CustomError.cs
- DeclaredTypeValidator.cs
- GlobalizationSection.cs
- PrimitiveXmlSerializers.cs
- VisualTarget.cs
- HostedHttpContext.cs
- MenuEventArgs.cs
- DictionaryBase.cs
- File.cs
- WebPartMenuStyle.cs
- FlowDocumentReaderAutomationPeer.cs
- FixedSOMLineRanges.cs
- ServiceSecurityAuditElement.cs
- Label.cs
- EmptyElement.cs
- CellQuery.cs
- CompoundFileDeflateTransform.cs
- SelectionProviderWrapper.cs
- TrustSection.cs
- AmbiguousMatchException.cs
- ControlBuilderAttribute.cs
- Axis.cs
- WindowsRichEditRange.cs
- OpenTypeLayoutCache.cs
- InputReferenceExpression.cs
- BypassElementCollection.cs
- ReliableChannelListener.cs
- DataGridViewRowsAddedEventArgs.cs
- MimeImporter.cs
- OrderedDictionary.cs
- SqlDataSourceFilteringEventArgs.cs
- XmlSchemaExternal.cs
- ContextItemManager.cs
- DecoderBestFitFallback.cs
- Control.cs
- NonSerializedAttribute.cs
- __ComObject.cs
- RowToParametersTransformer.cs
- PropertyContainer.cs
- ListView.cs
- KeyValuePair.cs
- SessionPageStateSection.cs
- PageThemeBuildProvider.cs
- Point3D.cs
- ModelUtilities.cs
- SecurityContextKeyIdentifierClause.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- CryptoProvider.cs
- ImageKeyConverter.cs
- ConstructorNeedsTagAttribute.cs
- TextDecorationCollection.cs
- WebPartChrome.cs
- FontUnitConverter.cs
- ApplyHostConfigurationBehavior.cs
- MinMaxParagraphWidth.cs
- BaseComponentEditor.cs