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
- CompressionTransform.cs
- EncoderFallback.cs
- ForeignKeyFactory.cs
- SchemaMapping.cs
- SurrogateSelector.cs
- LocalizationCodeDomSerializer.cs
- base64Transforms.cs
- CorruptingExceptionCommon.cs
- RequestQueue.cs
- WindowPattern.cs
- DataTemplateKey.cs
- OdbcConnectionStringbuilder.cs
- cookiecollection.cs
- HwndTarget.cs
- SessionStateSection.cs
- RoleGroupCollectionEditor.cs
- PathFigureCollection.cs
- OdbcEnvironment.cs
- UrlAuthorizationModule.cs
- ListenerServiceInstallComponent.cs
- SafeHandles.cs
- IUnknownConstantAttribute.cs
- CodeAttributeDeclarationCollection.cs
- Tuple.cs
- ColorBlend.cs
- SQLBoolean.cs
- GatewayDefinition.cs
- SQLInt16Storage.cs
- WizardPanel.cs
- KeyGesture.cs
- KeyToListMap.cs
- ToolStripComboBox.cs
- Unit.cs
- RMEnrollmentPage1.cs
- documentsequencetextpointer.cs
- SqlParameter.cs
- WebPartActionVerb.cs
- ZipIOLocalFileHeader.cs
- StrongNamePublicKeyBlob.cs
- SoapCommonClasses.cs
- DefaultPrintController.cs
- latinshape.cs
- TextRenderer.cs
- altserialization.cs
- ScriptControl.cs
- TreeNodeStyle.cs
- FileLogRecordEnumerator.cs
- BitmapEffectGroup.cs
- RayMeshGeometry3DHitTestResult.cs
- MemoryRecordBuffer.cs
- CopyNamespacesAction.cs
- CustomAttributeBuilder.cs
- WebResourceUtil.cs
- StringAttributeCollection.cs
- DataControlField.cs
- SecurityUniqueId.cs
- unitconverter.cs
- LinqDataSourceView.cs
- TextDecoration.cs
- XmlSchemaSequence.cs
- _IPv6Address.cs
- ImageListUtils.cs
- PropertyGrid.cs
- FuncTypeConverter.cs
- EventLogPermissionAttribute.cs
- DeferredTextReference.cs
- BookmarkScopeInfo.cs
- CorrelationActionMessageFilter.cs
- ServiceProviders.cs
- PageThemeBuildProvider.cs
- NegotiateStream.cs
- OleDbFactory.cs
- BamlVersionHeader.cs
- ChangeToolStripParentVerb.cs
- DbProviderSpecificTypePropertyAttribute.cs
- SimpleMailWebEventProvider.cs
- DefaultBinder.cs
- WpfKnownMember.cs
- TcpServerChannel.cs
- RegexRunnerFactory.cs
- AppSettingsReader.cs
- ClientTarget.cs
- ArraySortHelper.cs
- Enum.cs
- SqlReorderer.cs
- DataList.cs
- RequestQueue.cs
- ListItem.cs
- MetadataArtifactLoaderComposite.cs
- EnumValAlphaComparer.cs
- BindingSourceDesigner.cs
- mda.cs
- StaticExtension.cs
- JsonEnumDataContract.cs
- RelatedView.cs
- AssemblyAssociatedContentFileAttribute.cs
- ImageIndexConverter.cs
- RelationshipManager.cs
- WebPartConnectionsCloseVerb.cs
- ProviderCommandInfoUtils.cs