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
- ToolStripItemEventArgs.cs
- TypeConverterAttribute.cs
- EntitySetDataBindingList.cs
- DataGridRowsPresenter.cs
- CollectionViewSource.cs
- PathParser.cs
- XPathNavigatorReader.cs
- EmptyReadOnlyDictionaryInternal.cs
- DataBinder.cs
- InputDevice.cs
- StringFormat.cs
- IconBitmapDecoder.cs
- EtwTrackingBehaviorElement.cs
- XmlSchemaValidationException.cs
- SqlOuterApplyReducer.cs
- PartialCachingControl.cs
- StructuredType.cs
- DtrList.cs
- BinaryVersion.cs
- shaperfactory.cs
- ServicePoint.cs
- DataMisalignedException.cs
- CellTreeSimplifier.cs
- LogEntryUtils.cs
- AsyncResult.cs
- Point3D.cs
- filewebresponse.cs
- EventSetter.cs
- followingsibling.cs
- AssociativeAggregationOperator.cs
- ObjectTag.cs
- ZipIOExtraField.cs
- ModifiableIteratorCollection.cs
- OperationAbortedException.cs
- WebPartCatalogCloseVerb.cs
- EastAsianLunisolarCalendar.cs
- CodeComment.cs
- TripleDESCryptoServiceProvider.cs
- ModelVisual3D.cs
- DataGridViewTextBoxCell.cs
- WebControlToolBoxItem.cs
- ModelPropertyImpl.cs
- DataSourceNameHandler.cs
- ToolStripSeparator.cs
- PerformanceCounterPermissionEntry.cs
- BinaryConverter.cs
- DurableInstanceProvider.cs
- TypeSystemProvider.cs
- DocumentEventArgs.cs
- SingleStorage.cs
- WindowsPrincipal.cs
- FileDialog_Vista_Interop.cs
- ModifierKeysValueSerializer.cs
- SystemIPv6InterfaceProperties.cs
- TextTreeTextBlock.cs
- ServiceDescriptionImporter.cs
- ValueQuery.cs
- SafeEventLogReadHandle.cs
- WithParamAction.cs
- TraceSection.cs
- ButtonChrome.cs
- BitmapInitialize.cs
- PrintDocument.cs
- WorkerRequest.cs
- IncrementalHitTester.cs
- XmlAttribute.cs
- DropShadowEffect.cs
- AudioDeviceOut.cs
- DocumentOrderQuery.cs
- StylusTouchDevice.cs
- XmlSerializerAssemblyAttribute.cs
- ErrorsHelper.cs
- InfoCardKeyedHashAlgorithm.cs
- WorkflowServiceHost.cs
- PageRanges.cs
- DataKeyArray.cs
- UnionCqlBlock.cs
- WebCodeGenerator.cs
- StringOutput.cs
- login.cs
- ConnectionConsumerAttribute.cs
- MaxSessionCountExceededException.cs
- DataGridViewSelectedCellCollection.cs
- EpmCustomContentDeSerializer.cs
- TargetControlTypeCache.cs
- WaitHandle.cs
- TranslateTransform.cs
- InkCanvasFeedbackAdorner.cs
- PageCatalogPartDesigner.cs
- EdmPropertyAttribute.cs
- ConfigurationManagerInternal.cs
- ControlCachePolicy.cs
- DbConnectionPoolOptions.cs
- SplineQuaternionKeyFrame.cs
- HMACSHA1.cs
- Variant.cs
- FunctionOverloadResolver.cs
- RadialGradientBrush.cs
- Switch.cs
- CodeGroup.cs