Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- TemplateKey.cs
- CollectionChange.cs
- TrustManagerPromptUI.cs
- SelectionEditingBehavior.cs
- CompressionTransform.cs
- BitmapEffectDrawingContent.cs
- CultureInfo.cs
- ReadOnlyHierarchicalDataSourceView.cs
- CustomTokenProvider.cs
- TextCharacters.cs
- TextContainerChangedEventArgs.cs
- Pkcs7Recipient.cs
- precedingsibling.cs
- BrowserCapabilitiesFactoryBase.cs
- SystemSounds.cs
- ReaderWriterLockSlim.cs
- StorageModelBuildProvider.cs
- WeakReferenceEnumerator.cs
- ClientApiGenerator.cs
- XhtmlTextWriter.cs
- JavaScriptString.cs
- KeyValuePairs.cs
- ValuePatternIdentifiers.cs
- AvTrace.cs
- NumericUpDown.cs
- ComponentRenameEvent.cs
- PathGradientBrush.cs
- TypeValidationEventArgs.cs
- EventToken.cs
- OdbcFactory.cs
- TextPointer.cs
- GenericUI.cs
- SequenceNumber.cs
- WebPartChrome.cs
- SchemaComplexType.cs
- AssociationEndMember.cs
- LinkUtilities.cs
- UncommonField.cs
- DrawingDrawingContext.cs
- DataSourceCacheDurationConverter.cs
- ViewDesigner.cs
- SqlResolver.cs
- SingleConverter.cs
- QilInvoke.cs
- DesignerToolStripControlHost.cs
- Size.cs
- NamedElement.cs
- CodeNamespaceImportCollection.cs
- ExtentKey.cs
- StreamWriter.cs
- MetadataHelper.cs
- MaskDescriptor.cs
- XMLUtil.cs
- KeyProperty.cs
- HashSetEqualityComparer.cs
- MyContact.cs
- FileSystemInfo.cs
- EdmFunction.cs
- ArraySegment.cs
- Exception.cs
- ColorPalette.cs
- BindingSourceDesigner.cs
- ServiceOperation.cs
- SafeNativeMethods.cs
- BoundColumn.cs
- WindowsRebar.cs
- StrokeFIndices.cs
- EditorPartChrome.cs
- HtmlTextViewAdapter.cs
- TextAutomationPeer.cs
- OdbcUtils.cs
- AppDomainCompilerProxy.cs
- HebrewCalendar.cs
- DataTable.cs
- EditorPartCollection.cs
- AudioFormatConverter.cs
- XPathParser.cs
- TokenBasedSetEnumerator.cs
- FixedSchema.cs
- Brush.cs
- BindableTemplateBuilder.cs
- PersonalizablePropertyEntry.cs
- CapabilitiesPattern.cs
- CompositeDispatchFormatter.cs
- DbConnectionOptions.cs
- ObservableCollection.cs
- StrokeNodeOperations.cs
- X509Utils.cs
- PreloadedPackages.cs
- PageWrapper.cs
- shaperfactoryquerycachekey.cs
- AtomicFile.cs
- HttpListener.cs
- SettingsPropertyValueCollection.cs
- DataProtection.cs
- WebPartEventArgs.cs
- ReadOnlyCollection.cs
- MenuRendererStandards.cs
- TransformerInfo.cs
- EditorResources.cs