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
- EntityProviderServices.cs
- DbSetClause.cs
- StoryFragments.cs
- DependencyPropertyValueSerializer.cs
- NativeCppClassAttribute.cs
- MailAddressCollection.cs
- MediaContextNotificationWindow.cs
- NonDualMessageSecurityOverHttp.cs
- MsmqDiagnostics.cs
- WindowsListViewItemStartMenu.cs
- X509ServiceCertificateAuthentication.cs
- HtmlLink.cs
- DynamicUpdateCommand.cs
- RenderContext.cs
- MDIControlStrip.cs
- ControlValuePropertyAttribute.cs
- ObjectTag.cs
- QilGeneratorEnv.cs
- ProvideValueServiceProvider.cs
- ResourceProviderFactory.cs
- UnionCodeGroup.cs
- SerialReceived.cs
- ObjectNavigationPropertyMapping.cs
- XmlSchemaInferenceException.cs
- DefaultProxySection.cs
- KeyboardDevice.cs
- XmlSchemaNotation.cs
- SqlDataSourceQueryConverter.cs
- QueryMath.cs
- TextServicesContext.cs
- Vector3DValueSerializer.cs
- WinEventHandler.cs
- FormatterConverter.cs
- EntitySqlQueryCacheEntry.cs
- SessionPageStateSection.cs
- AppearanceEditorPart.cs
- SID.cs
- DragEvent.cs
- ActivationServices.cs
- LocalizationCodeDomSerializer.cs
- IListConverters.cs
- Style.cs
- XhtmlTextWriter.cs
- UserNameSecurityTokenAuthenticator.cs
- streamingZipPartStream.cs
- ToolboxBitmapAttribute.cs
- ValueQuery.cs
- MDIWindowDialog.cs
- ObjectDataSourceEventArgs.cs
- SoapAttributeOverrides.cs
- remotingproxy.cs
- BindingContext.cs
- StringCollection.cs
- EntityClientCacheKey.cs
- CodeCommentStatement.cs
- TextSpan.cs
- WebDescriptionAttribute.cs
- RegisteredExpandoAttribute.cs
- PathFigureCollectionConverter.cs
- DataObjectAttribute.cs
- TextOutput.cs
- PowerModeChangedEventArgs.cs
- UriTemplateCompoundPathSegment.cs
- BufferBuilder.cs
- ChangeNode.cs
- CommandBindingCollection.cs
- _IPv4Address.cs
- CaseInsensitiveComparer.cs
- ImageSourceTypeConverter.cs
- Converter.cs
- DefaultTextStore.cs
- keycontainerpermission.cs
- StylusCollection.cs
- WsdlInspector.cs
- ListViewInsertedEventArgs.cs
- StringFormat.cs
- ContextMenu.cs
- TimersDescriptionAttribute.cs
- PropertyMetadata.cs
- SamlAdvice.cs
- AuthenticationConfig.cs
- WebPartMenu.cs
- CodeTryCatchFinallyStatement.cs
- AspNetRouteServiceHttpHandler.cs
- GeometryHitTestResult.cs
- DockPattern.cs
- FormCollection.cs
- ListMarkerSourceInfo.cs
- HtmlTernaryTree.cs
- ClientConfigurationSystem.cs
- CancelEventArgs.cs
- ServiceHttpHandlerFactory.cs
- RequiredAttributeAttribute.cs
- FileSystemWatcher.cs
- SettingsProviderCollection.cs
- InheritanceContextChangedEventManager.cs
- FontUnitConverter.cs
- ResourceDisplayNameAttribute.cs
- MediaTimeline.cs
- XmlSchemaSimpleContent.cs