Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / System / Windows / QueryContinueDragEventArgs.cs / 1 / QueryContinueDragEventArgs.cs
//---------------------------------------------------------------------------- // // File: QueryContinueDragEventArgs.cs // // Copyright (C) Microsoft Corporation. All rights reserved. // // Description: QueryContinueDragEventArgs for drag-and-drop operation. // // History: // 08/19/2004 : [....] Created // //--------------------------------------------------------------------------- using System; using System.Diagnostics; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows { ////// The QueryContinueDragEventArgs class represents a type of RoutedEventArgs that /// are relevant to QueryContinueDrag event. /// public sealed class QueryContinueDragEventArgs : RoutedEventArgs { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors ////// Initializes a new instance of the QueryContinueDragEventArgs class. /// /// /// Escape key was pressed. /// /// /// Input states. /// internal QueryContinueDragEventArgs(bool escapePressed, DragDropKeyStates dragDropKeyStates) { if (!DragDrop.IsValidDragDropKeyStates(dragDropKeyStates)) { Debug.Assert(false, "Invalid dragDropKeyStates"); } this._escapePressed = escapePressed; this._dragDropKeyStates = dragDropKeyStates; } #endregion Constructors //------------------------------------------------------ // // Public Methods // //----------------------------------------------------- #region Public Methods ////// Escape key was pressed. /// public bool EscapePressed { get { return _escapePressed; } } ////// The DragDropKeyStates that indicates the current states for /// physical keyboard keys and mouse buttons. /// public DragDropKeyStates KeyStates { get {return _dragDropKeyStates;} } ////// The action of drag operation /// public DragAction Action { get { return _action; } set { if (!DragDrop.IsValidDragAction(value)) { throw new ArgumentException(SR.Get(SRID.DragDrop_DragActionInvalid, "value")); } _action = value; } } #endregion Public Methods #region Protected Methods //------------------------------------------------------ // // Protected Methods // //------------------------------------------------------ ////// The mechanism used to call the type-specific handler on the target. /// /// /// The generic handler to call in a type-specific way. /// /// /// The target to call the handler on. /// protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget) { QueryContinueDragEventHandler handler = (QueryContinueDragEventHandler)genericHandler; handler(genericTarget, this); } #endregion Protected Methods //----------------------------------------------------- // // Private Fields // //------------------------------------------------------ #region Private Fields private bool _escapePressed; private DragDropKeyStates _dragDropKeyStates; private DragAction _action; #endregion Private Fields } } // 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
- FileSystemEventArgs.cs
- ProxyGenerationError.cs
- DatePickerAutomationPeer.cs
- ListItemCollection.cs
- ToolBarTray.cs
- LassoSelectionBehavior.cs
- BuilderPropertyEntry.cs
- InputLangChangeEvent.cs
- ConnectionStringsExpressionBuilder.cs
- ParallelDesigner.xaml.cs
- ResourceExpressionBuilder.cs
- SrgsRuleRef.cs
- HttpListenerException.cs
- EditingCoordinator.cs
- ParserOptions.cs
- shaperfactory.cs
- CompositeTypefaceMetrics.cs
- FixedSOMTextRun.cs
- LOSFormatter.cs
- ExtensionDataObject.cs
- mactripleDES.cs
- ResourcesGenerator.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- EntityContainerAssociationSet.cs
- ContextMenuStrip.cs
- MessageEncoderFactory.cs
- configsystem.cs
- LoadWorkflowByInstanceKeyCommand.cs
- SchemaCreator.cs
- AsymmetricSignatureDeformatter.cs
- XmlSchemaNotation.cs
- MessageBox.cs
- PropertyValue.cs
- TypeSystem.cs
- SafeHandles.cs
- ImageListStreamer.cs
- Models.cs
- TripleDESCryptoServiceProvider.cs
- ItemDragEvent.cs
- GenericArgumentsUpdater.cs
- RenameRuleObjectDialog.cs
- RectKeyFrameCollection.cs
- DataGridViewComboBoxCell.cs
- Walker.cs
- VariableModifiersHelper.cs
- WebServiceErrorEvent.cs
- ScrollChrome.cs
- SerializationSectionGroup.cs
- MethodToken.cs
- CodeCommentStatementCollection.cs
- CellTreeNodeVisitors.cs
- KeyInterop.cs
- _SingleItemRequestCache.cs
- LabelDesigner.cs
- LayoutEngine.cs
- Latin1Encoding.cs
- ValueConversionAttribute.cs
- List.cs
- CodeAccessPermission.cs
- MediaPlayerState.cs
- CompModSwitches.cs
- DataGridColumnsPage.cs
- ConfigUtil.cs
- SmiGettersStream.cs
- Mouse.cs
- PrintPreviewGraphics.cs
- SharedPerformanceCounter.cs
- DisplayMemberTemplateSelector.cs
- XhtmlTextWriter.cs
- DeclarativeCatalogPart.cs
- FontDifferentiator.cs
- RSAPKCS1SignatureFormatter.cs
- GPPOINT.cs
- Utility.cs
- HostDesigntimeLicenseContext.cs
- ExpressionBuilder.cs
- GenerateTemporaryAssemblyTask.cs
- StorageModelBuildProvider.cs
- InkCanvasSelectionAdorner.cs
- CalendarDataBindingHandler.cs
- ProtocolsConfigurationEntry.cs
- HtmlTableRow.cs
- HuffmanTree.cs
- ContextProperty.cs
- BaseCAMarshaler.cs
- DataGridColumnStyleMappingNameEditor.cs
- Pair.cs
- TraceContext.cs
- ListDictionaryInternal.cs
- TypeSystem.cs
- SapiRecognizer.cs
- IItemContainerGenerator.cs
- ContainerFilterService.cs
- StaticExtension.cs
- XmlProcessingInstruction.cs
- HttpCapabilitiesSectionHandler.cs
- MenuAutomationPeer.cs
- GeneralTransform2DTo3DTo2D.cs
- ResourceExpressionBuilder.cs
- XPathNavigatorReader.cs