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
- StandardOleMarshalObject.cs
- RequestDescription.cs
- Operators.cs
- SafeNativeMethods.cs
- UnsafeCollabNativeMethods.cs
- SafeMarshalContext.cs
- CollectionViewSource.cs
- Random.cs
- XmlCountingReader.cs
- CqlParser.cs
- PtsPage.cs
- DllNotFoundException.cs
- OracleColumn.cs
- Timer.cs
- LinqExpressionNormalizer.cs
- EnumUnknown.cs
- WindowsBrush.cs
- XmlCustomFormatter.cs
- UnmanagedMemoryStreamWrapper.cs
- StickyNoteHelper.cs
- XmlDataImplementation.cs
- GroupStyle.cs
- XamlBrushSerializer.cs
- CSharpCodeProvider.cs
- MatrixAnimationUsingKeyFrames.cs
- SortQuery.cs
- PriorityChain.cs
- XmlNamedNodeMap.cs
- SoapElementAttribute.cs
- PropertyMapper.cs
- JsonXmlDataContract.cs
- DelegateBodyWriter.cs
- WMICapabilities.cs
- Ops.cs
- Int32AnimationUsingKeyFrames.cs
- WindowsButton.cs
- ConsoleCancelEventArgs.cs
- DataSourceHelper.cs
- ICollection.cs
- Simplifier.cs
- ContentPropertyAttribute.cs
- SiblingIterators.cs
- BaseProcessProtocolHandler.cs
- Monitor.cs
- JsonFormatWriterGenerator.cs
- DetailsViewDeletedEventArgs.cs
- x509store.cs
- RepeaterDataBoundAdapter.cs
- DesignTimeVisibleAttribute.cs
- FillErrorEventArgs.cs
- ImageField.cs
- XslCompiledTransform.cs
- SoapHeaderAttribute.cs
- Size.cs
- VariableElement.cs
- OledbConnectionStringbuilder.cs
- TextMessageEncodingElement.cs
- Pair.cs
- SQLInt64Storage.cs
- SimpleModelProvider.cs
- GroupStyle.cs
- IsolatedStoragePermission.cs
- MiniCustomAttributeInfo.cs
- PagerSettings.cs
- SqlUtil.cs
- DBCommand.cs
- PrivateFontCollection.cs
- CollectionContainer.cs
- DataGridRowEventArgs.cs
- Size3DValueSerializer.cs
- ExecutionContext.cs
- SHA1Cng.cs
- LoginName.cs
- DiscoveryClientRequestChannel.cs
- CFStream.cs
- LiteralControl.cs
- VoiceSynthesis.cs
- ContextMenuStrip.cs
- Rectangle.cs
- PointHitTestResult.cs
- path.cs
- PageClientProxyGenerator.cs
- ValueUtilsSmi.cs
- Transform3D.cs
- DataObjectFieldAttribute.cs
- VectorCollection.cs
- OutputScopeManager.cs
- RedirectionProxy.cs
- ReflectionServiceProvider.cs
- GridViewPageEventArgs.cs
- QuaternionRotation3D.cs
- HybridDictionary.cs
- ChangeBlockUndoRecord.cs
- ParagraphResult.cs
- OdbcConnection.cs
- NonClientArea.cs
- QueryConverter.cs
- SystemGatewayIPAddressInformation.cs
- ServicePointManagerElement.cs
- UnmanagedHandle.cs