Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- Point.cs
- AmbientLight.cs
- SynchronizationFilter.cs
- NavigationExpr.cs
- DataMemberFieldConverter.cs
- TextStore.cs
- Panel.cs
- ProgressChangedEventArgs.cs
- ApplicationBuildProvider.cs
- Line.cs
- HorizontalAlignConverter.cs
- AbstractExpressions.cs
- ImageBrush.cs
- XmlSerializerVersionAttribute.cs
- XamlClipboardData.cs
- CoTaskMemUnicodeSafeHandle.cs
- FigureParaClient.cs
- SpecialNameAttribute.cs
- TextBox.cs
- WindowsFormsLinkLabel.cs
- DLinqAssociationProvider.cs
- OracleTimeSpan.cs
- BrowserCapabilitiesCompiler.cs
- ColorMatrix.cs
- BamlStream.cs
- SectionVisual.cs
- WebConfigurationHostFileChange.cs
- PackWebRequestFactory.cs
- SecureUICommand.cs
- SafeFileMappingHandle.cs
- NameValueSectionHandler.cs
- ClientSideQueueItem.cs
- RangeValuePattern.cs
- FigureParagraph.cs
- PropertyTabChangedEvent.cs
- CodeThrowExceptionStatement.cs
- DataServiceOperationContext.cs
- ReadOnlyCollection.cs
- TypeName.cs
- TextDecorationCollectionConverter.cs
- PreviewPageInfo.cs
- EntitySetBase.cs
- Quaternion.cs
- PointUtil.cs
- DataSourceDescriptorCollection.cs
- ListenerElementsCollection.cs
- LoadWorkflowByKeyAsyncResult.cs
- SqlBuilder.cs
- ColorContextHelper.cs
- Light.cs
- httpapplicationstate.cs
- HttpSysSettings.cs
- OledbConnectionStringbuilder.cs
- GridViewColumnCollectionChangedEventArgs.cs
- SafeHandles.cs
- UpdateTranslator.cs
- TextMetrics.cs
- HtmlCalendarAdapter.cs
- XmlExpressionDumper.cs
- WorkflowExecutor.cs
- ResourcePool.cs
- WebPartConnectionsConfigureVerb.cs
- LinkGrep.cs
- OdbcConnectionPoolProviderInfo.cs
- XmlnsCache.cs
- DataGridLinkButton.cs
- EnlistmentState.cs
- HtmlTableRowCollection.cs
- DataGridRow.cs
- TaiwanLunisolarCalendar.cs
- WebPartMovingEventArgs.cs
- COM2Properties.cs
- UIElementParaClient.cs
- PartialList.cs
- Message.cs
- HostedTcpTransportManager.cs
- FamilyMap.cs
- RecognizeCompletedEventArgs.cs
- Brush.cs
- SchemaDeclBase.cs
- ToolStripGrip.cs
- DBCSCodePageEncoding.cs
- FileSystemInfo.cs
- ControlValuePropertyAttribute.cs
- UIntPtr.cs
- Stopwatch.cs
- GeneralTransform.cs
- DataSourceProvider.cs
- Splitter.cs
- TreeWalkHelper.cs
- BindingSourceDesigner.cs
- ErrorFormatter.cs
- FileDialogCustomPlace.cs
- UiaCoreApi.cs
- ApplicationFileCodeDomTreeGenerator.cs
- XPathItem.cs
- XsdCachingReader.cs
- TreeNodeSelectionProcessor.cs
- IdentityModelStringsVersion1.cs
- ClientConfigPaths.cs