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
- SystemEvents.cs
- WindowsFormsHost.cs
- XmlEnumAttribute.cs
- PropertyMapper.cs
- SpellerInterop.cs
- InvalidOperationException.cs
- TiffBitmapEncoder.cs
- TraceUtility.cs
- DtdParser.cs
- OdbcConnectionOpen.cs
- HttpResponseInternalWrapper.cs
- HwndHostAutomationPeer.cs
- ActivityDesignerLayoutSerializers.cs
- KeyedPriorityQueue.cs
- RegexGroup.cs
- ComponentResourceManager.cs
- TileBrush.cs
- AutomationPatternInfo.cs
- DataGrid.cs
- ScrollChangedEventArgs.cs
- XmlAnyElementAttributes.cs
- XPathSingletonIterator.cs
- RepeatButton.cs
- TCPListener.cs
- ProbeDuplexAsyncResult.cs
- CreatingCookieEventArgs.cs
- recordstate.cs
- ActivationArguments.cs
- tibetanshape.cs
- TagMapCollection.cs
- LinkClickEvent.cs
- Point4DValueSerializer.cs
- DetailsViewRow.cs
- NavigationPropertyEmitter.cs
- FormViewUpdateEventArgs.cs
- SimpleRecyclingCache.cs
- PageOrientation.cs
- ObjectAnimationBase.cs
- SqlServer2KCompatibilityCheck.cs
- ProfessionalColorTable.cs
- ContentType.cs
- HttpRequestMessageProperty.cs
- Double.cs
- FormsAuthentication.cs
- DragStartedEventArgs.cs
- AssemblyBuilder.cs
- Wizard.cs
- NameTable.cs
- AppSettingsReader.cs
- StylusCaptureWithinProperty.cs
- OverlappedContext.cs
- BmpBitmapEncoder.cs
- HyperLinkStyle.cs
- AsymmetricKeyExchangeFormatter.cs
- Int16Converter.cs
- QueueProcessor.cs
- EntityDataSource.cs
- StylusPointPropertyInfoDefaults.cs
- GridViewPageEventArgs.cs
- MultiAsyncResult.cs
- GridViewItemAutomationPeer.cs
- PopupControlService.cs
- EventMappingSettingsCollection.cs
- KeyConstraint.cs
- ToolStripDropTargetManager.cs
- SqlProcedureAttribute.cs
- ListParaClient.cs
- MediaSystem.cs
- ComponentEditorForm.cs
- COMException.cs
- DrawingGroup.cs
- X509AsymmetricSecurityKey.cs
- InfoCardCryptoHelper.cs
- RoleGroupCollection.cs
- SecuritySessionServerSettings.cs
- PerformanceCounter.cs
- Vertex.cs
- XmlSerializer.cs
- StyleSheet.cs
- CfgParser.cs
- LocatorBase.cs
- WizardPanelChangingEventArgs.cs
- PageThemeCodeDomTreeGenerator.cs
- AxParameterData.cs
- SchemaImporterExtensionElement.cs
- ExtendedPropertyDescriptor.cs
- RelatedImageListAttribute.cs
- TypeToken.cs
- OverflowException.cs
- UnmanagedMemoryStreamWrapper.cs
- UrlMapping.cs
- BufferModeSettings.cs
- MetadataCacheItem.cs
- DrawingState.cs
- Control.cs
- FormatControl.cs
- activationcontext.cs
- CodeDomLocalizationProvider.cs
- Msec.cs
- HttpListenerPrefixCollection.cs