Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- MemberDomainMap.cs
- DataColumnCollection.cs
- SamlAssertionKeyIdentifierClause.cs
- LocalizeDesigner.cs
- EdmType.cs
- Int32Converter.cs
- DateTimeValueSerializerContext.cs
- DbParameterHelper.cs
- PresentationUIStyleResources.cs
- CoreChannel.cs
- ParameterModifier.cs
- HijriCalendar.cs
- UserValidatedEventArgs.cs
- ClientBuildManagerCallback.cs
- OleDbDataAdapter.cs
- DataGridViewBindingCompleteEventArgs.cs
- FontWeightConverter.cs
- ObjectResult.cs
- RsaKeyIdentifierClause.cs
- SessionStateSection.cs
- TextEditorSpelling.cs
- NegotiateStream.cs
- SourceCollection.cs
- XamlSerializerUtil.cs
- FilterableAttribute.cs
- KoreanLunisolarCalendar.cs
- HttpCachePolicyElement.cs
- ConnectionInterfaceCollection.cs
- Exceptions.cs
- ServiceModelExtensionCollectionElement.cs
- SecurityHelper.cs
- EntitySetDataBindingList.cs
- TabControlEvent.cs
- StringFormat.cs
- StringHelper.cs
- DBAsyncResult.cs
- TypeToken.cs
- AdapterDictionary.cs
- TextEditorSelection.cs
- HtmlTableCell.cs
- XhtmlStyleClass.cs
- TableRowCollection.cs
- NonClientArea.cs
- UniqueIdentifierService.cs
- KnownTypes.cs
- ConfigurationErrorsException.cs
- SQLBoolean.cs
- RelatedView.cs
- PowerStatus.cs
- CultureMapper.cs
- IdentityNotMappedException.cs
- TextSelectionHelper.cs
- ReadOnlyDataSourceView.cs
- SystemTcpConnection.cs
- COM2FontConverter.cs
- EmptyWithCancelationCheckWorkItem.cs
- LocalizationComments.cs
- AdornedElementPlaceholder.cs
- ComboBoxItem.cs
- Graphics.cs
- ContainerCodeDomSerializer.cs
- XmlAnyAttributeAttribute.cs
- XmlSchemaParticle.cs
- BamlResourceSerializer.cs
- CrossContextChannel.cs
- WindowsProgressbar.cs
- Trigger.cs
- AppDomainAttributes.cs
- TransformProviderWrapper.cs
- coordinatorscratchpad.cs
- ExpanderAutomationPeer.cs
- TextViewBase.cs
- DriveInfo.cs
- ExpressionStringBuilder.cs
- AccessViolationException.cs
- AssociatedControlConverter.cs
- HtmlMeta.cs
- XmlValidatingReaderImpl.cs
- CompositeClientFormatter.cs
- StickyNoteContentControl.cs
- SchemaDeclBase.cs
- MatchNoneMessageFilter.cs
- DateTimeSerializationSection.cs
- ConstructorBuilder.cs
- PersonalizableTypeEntry.cs
- CodeMemberField.cs
- WebBrowserEvent.cs
- PerformanceCounterPermission.cs
- RSAPKCS1KeyExchangeFormatter.cs
- DefaultEvaluationContext.cs
- HostDesigntimeLicenseContext.cs
- Page.cs
- SudsCommon.cs
- ReaderWriterLock.cs
- DataSourceCacheDurationConverter.cs
- ModelTreeEnumerator.cs
- ThreadBehavior.cs
- SafeNativeMemoryHandle.cs
- BitmapFrameEncode.cs
- UpdateTranslator.cs