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
- ButtonChrome.cs
- ResourceLoader.cs
- XmlCharacterData.cs
- NotifyInputEventArgs.cs
- SendActivityDesigner.cs
- ProviderCommandInfoUtils.cs
- DetailsViewUpdatedEventArgs.cs
- PipelineModuleStepContainer.cs
- RegistryConfigurationProvider.cs
- InvalidPrinterException.cs
- SQLRoleProvider.cs
- PathSegmentCollection.cs
- XmlQualifiedNameTest.cs
- SoapHeaders.cs
- TripleDES.cs
- ErrorHandler.cs
- Compiler.cs
- __FastResourceComparer.cs
- StructuredTypeInfo.cs
- DockProviderWrapper.cs
- EntityConnectionStringBuilderItem.cs
- TextEditorThreadLocalStore.cs
- Propagator.cs
- TextComposition.cs
- WinInet.cs
- StateBag.cs
- CompareInfo.cs
- PermissionRequestEvidence.cs
- XmlExpressionDumper.cs
- CapabilitiesSection.cs
- EpmSyndicationContentSerializer.cs
- RuntimeArgumentHandle.cs
- RowParagraph.cs
- DynamicILGenerator.cs
- EdmItemCollection.cs
- BitmapEffectDrawingContextWalker.cs
- PointKeyFrameCollection.cs
- BindingWorker.cs
- Part.cs
- TreeWalkHelper.cs
- cookiecollection.cs
- Serializer.cs
- WebPartChrome.cs
- SecurityProtocolCorrelationState.cs
- UIElementParaClient.cs
- LinqTreeNodeEvaluator.cs
- ApplicationCommands.cs
- BackStopAuthenticationModule.cs
- AutomationProperties.cs
- VisualBrush.cs
- WebPartCatalogAddVerb.cs
- TextBoxLine.cs
- AdCreatedEventArgs.cs
- Interop.cs
- FontNamesConverter.cs
- NullableBoolConverter.cs
- ServiceDeploymentInfo.cs
- DataControlImageButton.cs
- InterleavedZipPartStream.cs
- SiteMapNodeItemEventArgs.cs
- TraceListeners.cs
- DecimalConverter.cs
- FontClient.cs
- SqlPersistenceProviderFactory.cs
- Object.cs
- TerminateSequence.cs
- BaseTemplateParser.cs
- DesignBinding.cs
- __ConsoleStream.cs
- AdornerDecorator.cs
- ObjectToken.cs
- MergeFailedEvent.cs
- ToolStripDropDownMenu.cs
- TreeViewImageGenerator.cs
- CachedBitmap.cs
- TextBoxBase.cs
- FragmentNavigationEventArgs.cs
- UTF7Encoding.cs
- Exceptions.cs
- TreeNodeCollection.cs
- DiscoveryService.cs
- ReferencedAssemblyResolver.cs
- _SafeNetHandles.cs
- XmlNamespaceDeclarationsAttribute.cs
- ListView.cs
- HtmlInputText.cs
- EntityDataSourceDataSelectionPanel.designer.cs
- SystemFonts.cs
- OutOfProcStateClientManager.cs
- StatusInfoItem.cs
- HtmlToClrEventProxy.cs
- AbstractDataSvcMapFileLoader.cs
- ConfigWriter.cs
- GeometryDrawing.cs
- XmlSerializerAssemblyAttribute.cs
- ping.cs
- SQLByteStorage.cs
- LabelDesigner.cs
- StickyNoteHelper.cs
- RawAppCommandInputReport.cs