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
- TextFindEngine.cs
- SortDescription.cs
- OleDbInfoMessageEvent.cs
- LoginStatusDesigner.cs
- XmlSchemaObjectTable.cs
- SEHException.cs
- HtmlContainerControl.cs
- DbConnectionPool.cs
- RightsManagementPermission.cs
- ConditionalAttribute.cs
- DictionaryMarkupSerializer.cs
- StoreAnnotationsMap.cs
- WindowsGrip.cs
- MenuItemCollectionEditorDialog.cs
- EncryptedType.cs
- DeferredReference.cs
- DirectionalLight.cs
- ToolStripDropDownClosedEventArgs.cs
- ModelItemCollectionImpl.cs
- Vector3DCollectionValueSerializer.cs
- KeyBinding.cs
- COAUTHIDENTITY.cs
- HandlerFactoryWrapper.cs
- Workspace.cs
- DataGridViewColumnEventArgs.cs
- GeometryCombineModeValidation.cs
- ElementMarkupObject.cs
- DataGridCommandEventArgs.cs
- WebPartDisplayModeCollection.cs
- Touch.cs
- GridViewRowPresenter.cs
- WebServicesInteroperability.cs
- RenderData.cs
- GenerateHelper.cs
- TransformCryptoHandle.cs
- DataChangedEventManager.cs
- WorkflowInspectionServices.cs
- WebZone.cs
- InheritedPropertyChangedEventArgs.cs
- SerializationFieldInfo.cs
- EntityContainerEmitter.cs
- UrlAuthFailedErrorFormatter.cs
- DuplexChannelFactory.cs
- AdornedElementPlaceholder.cs
- ColumnResizeUndoUnit.cs
- errorpatternmatcher.cs
- X509WindowsSecurityToken.cs
- Operand.cs
- XmlUtf8RawTextWriter.cs
- StrokeFIndices.cs
- Enum.cs
- QilChoice.cs
- Select.cs
- BoundPropertyEntry.cs
- OutputCacheSettingsSection.cs
- StateMachineSubscriptionManager.cs
- ToolboxDataAttribute.cs
- UInt32Storage.cs
- HttpCacheVary.cs
- SafeNativeMethods.cs
- XmlSchemaComplexContentRestriction.cs
- SqlDataRecord.cs
- MenuItemBindingCollection.cs
- DataGridViewTextBoxEditingControl.cs
- PrintController.cs
- KeyValuePairs.cs
- IndexObject.cs
- LocalizableAttribute.cs
- MetafileEditor.cs
- HttpBrowserCapabilitiesBase.cs
- ProviderSettings.cs
- Model3D.cs
- MemoryMappedViewAccessor.cs
- SliderAutomationPeer.cs
- DeflateStream.cs
- BaseUriHelper.cs
- TransactionState.cs
- MappingSource.cs
- PropertyEmitter.cs
- MenuItemCollection.cs
- XmlAttributeProperties.cs
- CustomTypeDescriptor.cs
- ForceCopyBuildProvider.cs
- MenuItem.cs
- HighContrastHelper.cs
- BitStack.cs
- DataRow.cs
- DomainConstraint.cs
- UserControl.cs
- DataRowCollection.cs
- InstanceCompleteException.cs
- SrgsGrammar.cs
- KnownTypes.cs
- TableLayoutPanel.cs
- VisualBrush.cs
- DataGridAddNewRow.cs
- DiscoveryRequestHandler.cs
- ContactManager.cs
- IntegerCollectionEditor.cs
- ListBoxChrome.cs