Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WpfWebRequestHelper.cs
- ListViewHitTestInfo.cs
- DictionaryEntry.cs
- FlowLayoutSettings.cs
- MenuItemStyleCollection.cs
- DataRowComparer.cs
- InputReportEventArgs.cs
- TextEditorTables.cs
- XmlSchemaImport.cs
- DataGridViewRowConverter.cs
- Command.cs
- FixedSOMPageElement.cs
- ResourcePool.cs
- ClientSideProviderDescription.cs
- Merger.cs
- ExpressionDumper.cs
- SelectedDatesCollection.cs
- RotateTransform3D.cs
- WorkflowPersistenceContext.cs
- GridSplitterAutomationPeer.cs
- DomainConstraint.cs
- MediaPlayer.cs
- MultipleCopiesCollection.cs
- MimeFormReflector.cs
- HttpDigestClientCredential.cs
- DocobjHost.cs
- CompositeDispatchFormatter.cs
- IisTraceListener.cs
- graph.cs
- TransactionsSectionGroup.cs
- ValidationPropertyAttribute.cs
- EtwProvider.cs
- StylusOverProperty.cs
- StrongNameSignatureInformation.cs
- AssociationType.cs
- KeyedHashAlgorithm.cs
- ContentHostHelper.cs
- BitmapEffect.cs
- HtmlControl.cs
- ObjectFullSpanRewriter.cs
- ContainerFilterService.cs
- WsdlWriter.cs
- Substitution.cs
- TemplatedWizardStep.cs
- DeleteHelper.cs
- SignedPkcs7.cs
- Automation.cs
- EncoderParameters.cs
- RepeaterCommandEventArgs.cs
- KeyPullup.cs
- ClientConfigPaths.cs
- SpecularMaterial.cs
- ObjectItemConventionAssemblyLoader.cs
- LongCountAggregationOperator.cs
- ZipIOExtraField.cs
- XmlTextEncoder.cs
- DebugView.cs
- Module.cs
- datacache.cs
- BrowserCapabilitiesFactoryBase.cs
- Sql8ConformanceChecker.cs
- CodeAttributeArgument.cs
- FreeFormDragDropManager.cs
- ConnectionOrientedTransportChannelListener.cs
- COSERVERINFO.cs
- ObjectDataSourceDesigner.cs
- ConfigurationErrorsException.cs
- PasswordTextContainer.cs
- ConnectionManagementElementCollection.cs
- RequestCacheEntry.cs
- HttpRequestCacheValidator.cs
- ServicePoint.cs
- MULTI_QI.cs
- CodeTryCatchFinallyStatement.cs
- ListBox.cs
- ChannelManagerService.cs
- SafeCryptHandles.cs
- KeyTimeConverter.cs
- Lookup.cs
- HtmlString.cs
- GridViewUpdateEventArgs.cs
- XmlDocument.cs
- ObjectDataProvider.cs
- StaticFileHandler.cs
- ArgumentsParser.cs
- DelegatingConfigHost.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- SqlDataSourceEnumerator.cs
- ResourceAssociationType.cs
- HelpKeywordAttribute.cs
- FlowLayoutSettings.cs
- XmlSchemaComplexContentRestriction.cs
- AudioFormatConverter.cs
- SQLSingleStorage.cs
- WebPartManager.cs
- Asn1IntegerConverter.cs
- ComPlusTraceRecord.cs
- BufferAllocator.cs
- ClientCredentialsSecurityTokenManager.cs
- TemplateControlParser.cs