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
- NamespaceDecl.cs
- InstallerTypeAttribute.cs
- BreadCrumbTextConverter.cs
- COM2IDispatchConverter.cs
- Logging.cs
- XmlDomTextWriter.cs
- UnsupportedPolicyOptionsException.cs
- ListenerElementsCollection.cs
- ReflectionHelper.cs
- LingerOption.cs
- Latin1Encoding.cs
- SQLMoneyStorage.cs
- LineMetrics.cs
- DataSourceControlBuilder.cs
- ToolStripDropDownButton.cs
- NetMsmqBindingCollectionElement.cs
- ConnectionManagementSection.cs
- FigureParaClient.cs
- Button.cs
- HtmlPhoneCallAdapter.cs
- FixedTextSelectionProcessor.cs
- DocumentViewerBaseAutomationPeer.cs
- XmlSchemaComplexContent.cs
- TransformProviderWrapper.cs
- ConditionalWeakTable.cs
- UrlPropertyAttribute.cs
- ToolStripItemImageRenderEventArgs.cs
- QueueSurrogate.cs
- RowParagraph.cs
- ListItemCollection.cs
- NameValuePair.cs
- Converter.cs
- Ops.cs
- CrossAppDomainChannel.cs
- FieldValue.cs
- DesignerHelpers.cs
- ReadOnlyDictionary.cs
- FastEncoder.cs
- AdapterUtil.cs
- WindowsListBox.cs
- DbXmlEnabledProviderManifest.cs
- PrintDialogException.cs
- BinHexEncoding.cs
- NegotiateStream.cs
- ActivityTypeDesigner.xaml.cs
- IdentityReference.cs
- DeviceFilterEditorDialog.cs
- InfoCardTrace.cs
- sitestring.cs
- TypeRestriction.cs
- TextChangedEventArgs.cs
- AssociationSetMetadata.cs
- ForwardPositionQuery.cs
- DESCryptoServiceProvider.cs
- WinInet.cs
- Clipboard.cs
- ColumnMapProcessor.cs
- CanonicalXml.cs
- SafeReversePInvokeHandle.cs
- ToolStripSplitButton.cs
- SAPIEngineTypes.cs
- XmlConvert.cs
- PasswordTextContainer.cs
- DefaultValueTypeConverter.cs
- KeyValuePairs.cs
- HMAC.cs
- UrlPath.cs
- XmlSchemaInfo.cs
- BitmapEffectvisualstate.cs
- TextFindEngine.cs
- Context.cs
- DocumentViewerAutomationPeer.cs
- TdsValueSetter.cs
- _HTTPDateParse.cs
- MonikerUtility.cs
- HttpRawResponse.cs
- BitmapMetadata.cs
- InputReportEventArgs.cs
- CheckBoxStandardAdapter.cs
- WorkflowInstanceProxy.cs
- CommandLineParser.cs
- DataGridViewLinkCell.cs
- ListDataBindEventArgs.cs
- SubqueryRules.cs
- ButtonChrome.cs
- CallbackValidator.cs
- ToggleProviderWrapper.cs
- FileUpload.cs
- KnownTypeAttribute.cs
- SqlUserDefinedAggregateAttribute.cs
- TypedDataSetSchemaImporterExtensionFx35.cs
- Exception.cs
- ClickablePoint.cs
- IItemProperties.cs
- SafeEventHandle.cs
- CommentEmitter.cs
- VariantWrapper.cs
- SafeFileHandle.cs
- Enlistment.cs
- entityreference_tresulttype.cs