Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / System / Windows / Input / Command / CanExecuteRoutedEventArgs.cs / 1 / CanExecuteRoutedEventArgs.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Windows; using System.Windows.Input; namespace System.Windows.Input { ////// Event handler associated with the CanExecute events. /// public delegate void CanExecuteRoutedEventHandler(object sender, CanExecuteRoutedEventArgs e); ////// Event arguments for the CanExecute events. /// public sealed class CanExecuteRoutedEventArgs : RoutedEventArgs { #region Constructors ////// Initializes a new instance of this class. /// /// The command that is being executed. /// The parameter that was passed when executing the command. internal CanExecuteRoutedEventArgs(ICommand command, object parameter) { if (command == null) { throw new ArgumentNullException("command"); } _command = command; _parameter = parameter; } #endregion #region Public Properties ////// The command that could be executed. /// public ICommand Command { get { return _command; } } ////// The parameter passed when considering executing the command. /// public object Parameter { get { return _parameter; } } ////// Whether the command with the specified parameter can be executed. /// public bool CanExecute { get { return _canExecute; } set { _canExecute = value; } } ////// Whether the input event (if any) that caused the command /// should continue its route. /// public bool ContinueRouting { get { return _continueRouting; } set { _continueRouting = value; } } #endregion #region Protected Methods ////// Calls the handler. /// /// Handler delegate to invoke /// Target element protected override void InvokeEventHandler(Delegate genericHandler, object target) { CanExecuteRoutedEventHandler handler = (CanExecuteRoutedEventHandler)genericHandler; handler(target as DependencyObject, this); } #endregion #region Data private ICommand _command; private object _parameter; private bool _canExecute; // Defaults to false private bool _continueRouting; // Defaults to false #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
- NamespaceList.cs
- CloseSequenceResponse.cs
- Encoder.cs
- Light.cs
- DataGridCell.cs
- SamlAudienceRestrictionCondition.cs
- SrgsOneOf.cs
- DataServicePagingProviderWrapper.cs
- TemplatePropertyEntry.cs
- OptimisticConcurrencyException.cs
- XmlImplementation.cs
- StubHelpers.cs
- GPRECT.cs
- ReadContentAsBinaryHelper.cs
- SerializationSectionGroup.cs
- TextPatternIdentifiers.cs
- TextElementCollectionHelper.cs
- PeerCollaborationPermission.cs
- Encoding.cs
- DbParameterCollection.cs
- SkinBuilder.cs
- RegexRunnerFactory.cs
- SafeCoTaskMem.cs
- DataKey.cs
- Odbc32.cs
- TransactionScope.cs
- ScopedKnownTypes.cs
- RuntimeConfigurationRecord.cs
- SessionSwitchEventArgs.cs
- ParameterToken.cs
- SingleObjectCollection.cs
- fixedPageContentExtractor.cs
- DataGridViewCellStyleConverter.cs
- ByteAnimation.cs
- LineSegment.cs
- EntityDesignerDataSourceView.cs
- SendReply.cs
- GridSplitter.cs
- InertiaRotationBehavior.cs
- Highlights.cs
- PluralizationService.cs
- Converter.cs
- BindStream.cs
- TerminatorSinks.cs
- DynamicResourceExtension.cs
- DocumentReference.cs
- ActivitySurrogate.cs
- PeerCollaboration.cs
- SQLInt32Storage.cs
- ViewBase.cs
- WorkflowLayouts.cs
- coordinatorscratchpad.cs
- EventWaitHandle.cs
- _Win32.cs
- HintTextMaxWidthConverter.cs
- Error.cs
- DoubleAverageAggregationOperator.cs
- SystemWebSectionGroup.cs
- DiscoveryMessageSequence.cs
- Psha1DerivedKeyGenerator.cs
- SqlTypesSchemaImporter.cs
- BevelBitmapEffect.cs
- ServiceModelReg.cs
- DecimalConverter.cs
- DataGridTextBox.cs
- InkPresenterAutomationPeer.cs
- LinqDataView.cs
- xmlglyphRunInfo.cs
- CdpEqualityComparer.cs
- Unit.cs
- TimersDescriptionAttribute.cs
- DatePickerAutomationPeer.cs
- TraceFilter.cs
- WS2007FederationHttpBindingCollectionElement.cs
- StrokeNodeOperations2.cs
- SplitContainer.cs
- GeometryDrawing.cs
- SubMenuStyleCollection.cs
- PositiveTimeSpanValidator.cs
- TraceInternal.cs
- XmlDocument.cs
- SqlBooleanMismatchVisitor.cs
- TriggerBase.cs
- PackageRelationshipSelector.cs
- StringResourceManager.cs
- ColorAnimation.cs
- NativeMethods.cs
- Padding.cs
- XmlDownloadManager.cs
- DeviceOverridableAttribute.cs
- Activator.cs
- Int64KeyFrameCollection.cs
- VScrollBar.cs
- CompilerErrorCollection.cs
- CachedPathData.cs
- FrameworkElement.cs
- ImageCreator.cs
- UInt32Converter.cs
- TreeNode.cs
- ListView.cs