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
- _BaseOverlappedAsyncResult.cs
- KnownBoxes.cs
- TypeConverterAttribute.cs
- UpDownEvent.cs
- CommonDialog.cs
- QilValidationVisitor.cs
- DbProviderFactory.cs
- DataContractSerializerFaultFormatter.cs
- AssociationSetEnd.cs
- SystemColorTracker.cs
- MarkupWriter.cs
- ImageButton.cs
- ParentQuery.cs
- ContextStaticAttribute.cs
- MetadataArtifactLoaderResource.cs
- AnnotationComponentManager.cs
- _NtlmClient.cs
- SelectionWordBreaker.cs
- SendingRequestEventArgs.cs
- DecimalKeyFrameCollection.cs
- ApplicationSettingsBase.cs
- TextBox.cs
- CompositionTarget.cs
- DocumentScope.cs
- Missing.cs
- FloaterBaseParagraph.cs
- ObjectParameter.cs
- __FastResourceComparer.cs
- Int64AnimationBase.cs
- PropertyTabAttribute.cs
- SiteIdentityPermission.cs
- Form.cs
- SessionParameter.cs
- _FixedSizeReader.cs
- CommandHelpers.cs
- Sentence.cs
- PerfService.cs
- ValidationError.cs
- MachinePropertyVariants.cs
- AccessDataSourceView.cs
- DataGridViewComboBoxCell.cs
- SqlDataSource.cs
- OdbcEnvironment.cs
- InputGestureCollection.cs
- ListCollectionView.cs
- HMACMD5.cs
- UnknownBitmapEncoder.cs
- FrameworkElementAutomationPeer.cs
- FormsAuthenticationUserCollection.cs
- X509PeerCertificateAuthentication.cs
- EntityStoreSchemaGenerator.cs
- SelectorItemAutomationPeer.cs
- SqlExpander.cs
- WaitHandleCannotBeOpenedException.cs
- BrowserTree.cs
- RSAOAEPKeyExchangeFormatter.cs
- ToolStripSeparatorRenderEventArgs.cs
- PieceDirectory.cs
- NamespaceTable.cs
- X509Chain.cs
- SecurityUtils.cs
- SmtpNegotiateAuthenticationModule.cs
- ListMarkerSourceInfo.cs
- OperationContractGenerationContext.cs
- EntitySqlException.cs
- AsyncPostBackTrigger.cs
- GeometryModel3D.cs
- WaitHandle.cs
- SqlPersonalizationProvider.cs
- XslException.cs
- LogicalTreeHelper.cs
- ByteStream.cs
- EventTrigger.cs
- EFDataModelProvider.cs
- DrawingDrawingContext.cs
- GridToolTip.cs
- Avt.cs
- Atom10FormatterFactory.cs
- FileInfo.cs
- SqlDataSourceStatusEventArgs.cs
- FastPropertyAccessor.cs
- Matrix3DValueSerializer.cs
- AssemblyFilter.cs
- SpeechSeg.cs
- ToolTip.cs
- TreeNodeStyleCollection.cs
- Timer.cs
- DiscoveryViaBehavior.cs
- StringFunctions.cs
- HttpApplicationFactory.cs
- ListViewInsertedEventArgs.cs
- DataServiceHostWrapper.cs
- Binding.cs
- ContentFilePart.cs
- KeyValueConfigurationCollection.cs
- OledbConnectionStringbuilder.cs
- WebPartEventArgs.cs
- ListViewUpdatedEventArgs.cs
- ReadOnlyDataSourceView.cs
- Pen.cs