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
- ConvertTextFrag.cs
- EdmError.cs
- SchemaType.cs
- TextSchema.cs
- Ops.cs
- Visitors.cs
- CodeChecksumPragma.cs
- ParallelForEach.cs
- RegexCompilationInfo.cs
- TriggerBase.cs
- Literal.cs
- RuntimeConfig.cs
- CachedPathData.cs
- SystemIPAddressInformation.cs
- PathStreamGeometryContext.cs
- Random.cs
- CopyAction.cs
- remotingproxy.cs
- ToolStripItemRenderEventArgs.cs
- InvalidCastException.cs
- HttpFormatExtensions.cs
- XslNumber.cs
- WorkflowInstanceContextProvider.cs
- TimelineCollection.cs
- EventHandlerList.cs
- RequestCachePolicyConverter.cs
- CompilerInfo.cs
- HashSetDebugView.cs
- FloaterParagraph.cs
- ArgumentException.cs
- HostProtectionPermission.cs
- SizeKeyFrameCollection.cs
- Stack.cs
- RectAnimationBase.cs
- BinaryCommonClasses.cs
- DetailsViewUpdateEventArgs.cs
- ScaleTransform.cs
- XsdDateTime.cs
- PrintPreviewControl.cs
- XmlSchemaCollection.cs
- AppSettingsSection.cs
- SmtpNetworkElement.cs
- AddDataControlFieldDialog.cs
- WebServiceResponseDesigner.cs
- DbModificationClause.cs
- TextServicesLoader.cs
- SqlBulkCopyColumnMappingCollection.cs
- Empty.cs
- ImageCollectionCodeDomSerializer.cs
- MsmqInputSessionChannel.cs
- IncrementalCompileAnalyzer.cs
- LinearKeyFrames.cs
- SecurityTimestamp.cs
- TypeResolver.cs
- PinnedBufferMemoryStream.cs
- DocumentSequence.cs
- DataGridViewButtonCell.cs
- DispatcherHooks.cs
- LinkArea.cs
- ClientSideQueueItem.cs
- LocationReference.cs
- DataControlHelper.cs
- TransactionValidationBehavior.cs
- TemplateLookupAction.cs
- MailAddress.cs
- KernelTypeValidation.cs
- CDSCollectionETWBCLProvider.cs
- DecimalAverageAggregationOperator.cs
- ServiceHostFactory.cs
- VirtualPath.cs
- TypedRowHandler.cs
- DependencyProperty.cs
- PerformanceCounter.cs
- SigningProgress.cs
- RangeValidator.cs
- OleDbCommandBuilder.cs
- DataGridView.cs
- unitconverter.cs
- Int16AnimationUsingKeyFrames.cs
- DataContractSerializerServiceBehavior.cs
- CommandHelper.cs
- XPathConvert.cs
- WinInetCache.cs
- CircleEase.cs
- ZipIOExtraField.cs
- SchemeSettingElement.cs
- util.cs
- PixelFormat.cs
- RequestValidator.cs
- ExeContext.cs
- BlurEffect.cs
- KoreanLunisolarCalendar.cs
- Evaluator.cs
- DataServices.cs
- Screen.cs
- InfiniteIntConverter.cs
- ResourceReader.cs
- XPathDocumentBuilder.cs
- LicenseManager.cs
- ManagementObjectCollection.cs