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
- NotifyInputEventArgs.cs
- WebScriptClientGenerator.cs
- CodeNamespaceImportCollection.cs
- QueryInterceptorAttribute.cs
- Matrix.cs
- FixedDocumentPaginator.cs
- validationstate.cs
- HtmlInputButton.cs
- CallTemplateAction.cs
- DoWorkEventArgs.cs
- UnmanagedMarshal.cs
- XmlLinkedNode.cs
- ILGenerator.cs
- ItemsChangedEventArgs.cs
- BufferedGraphicsManager.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- TimelineGroup.cs
- DataGridTableCollection.cs
- PropertyInformationCollection.cs
- BackgroundWorker.cs
- BasicExpressionVisitor.cs
- Debugger.cs
- SafeEventLogReadHandle.cs
- Enum.cs
- SafePEFileHandle.cs
- SqlTypeSystemProvider.cs
- SerializationSectionGroup.cs
- SettingsPropertyIsReadOnlyException.cs
- GroupQuery.cs
- Base64Decoder.cs
- InvalidPrinterException.cs
- OutputCacheEntry.cs
- ClientApiGenerator.cs
- SqlTypeConverter.cs
- TreeNodeCollection.cs
- UnsafeNativeMethods.cs
- StatusBarItemAutomationPeer.cs
- HttpWebRequest.cs
- XPathAxisIterator.cs
- XPathParser.cs
- DurableDispatcherAddressingFault.cs
- MethodToken.cs
- BaseAddressPrefixFilterElementCollection.cs
- String.cs
- StickyNoteAnnotations.cs
- tibetanshape.cs
- DeclarationUpdate.cs
- WebConfigurationFileMap.cs
- StorageEntityContainerMapping.cs
- ContextStaticAttribute.cs
- IRCollection.cs
- TextTreeNode.cs
- ConfigurationSettings.cs
- HMACSHA1.cs
- Composition.cs
- ButtonFlatAdapter.cs
- TableItemPatternIdentifiers.cs
- AutomationElement.cs
- TypeBuilderInstantiation.cs
- Converter.cs
- Effect.cs
- DefaultMergeHelper.cs
- ListDictionaryInternal.cs
- UnhandledExceptionEventArgs.cs
- UnionCqlBlock.cs
- TableTextElementCollectionInternal.cs
- TemplateControlParser.cs
- formatter.cs
- BinaryObjectInfo.cs
- Vector3DIndependentAnimationStorage.cs
- TextRangeSerialization.cs
- SHA384.cs
- ScriptManager.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- TriggerCollection.cs
- ChtmlTextWriter.cs
- RowVisual.cs
- SplayTreeNode.cs
- BitmapSource.cs
- WmlCommandAdapter.cs
- OperatingSystem.cs
- NavigationWindow.cs
- Ipv6Element.cs
- CodeDomExtensionMethods.cs
- X509Utils.cs
- SQLBytesStorage.cs
- mediaclock.cs
- Pen.cs
- CopyCodeAction.cs
- PartBasedPackageProperties.cs
- Stroke2.cs
- _WinHttpWebProxyDataBuilder.cs
- Win32KeyboardDevice.cs
- ExeContext.cs
- ScrollProperties.cs
- Config.cs
- AssignDesigner.xaml.cs
- DispatcherOperation.cs
- FilteredAttributeCollection.cs
- HtmlInputHidden.cs