Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / QueryContinueDragEventArgs.cs / 1305600 / QueryContinueDragEventArgs.cs
//---------------------------------------------------------------------------- // // File: QueryContinueDragEventArgs.cs // // Copyright (C) Microsoft Corporation. All rights reserved. // // Description: QueryContinueDragEventArgs for drag-and-drop operation. // // History: // 08/19/2004 : sangilj 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
- ToolStripHighContrastRenderer.cs
- Graph.cs
- SimpleWebHandlerParser.cs
- PersonalizationAdministration.cs
- WebBrowserSiteBase.cs
- _NestedMultipleAsyncResult.cs
- HierarchicalDataSourceIDConverter.cs
- BamlLocalizableResource.cs
- CodeCompileUnit.cs
- Rotation3DAnimation.cs
- MetaData.cs
- XmlQueryOutput.cs
- HyperLink.cs
- WasHostedComPlusFactory.cs
- TempEnvironment.cs
- EventHandlersStore.cs
- TableRowGroup.cs
- TopClause.cs
- Clause.cs
- ScrollEvent.cs
- NoneExcludedImageIndexConverter.cs
- PrimarySelectionAdorner.cs
- ContractUtils.cs
- DataRow.cs
- VerticalAlignConverter.cs
- UnsafeNativeMethodsMilCoreApi.cs
- DocumentSignatureManager.cs
- ServiceOperationWrapper.cs
- Fonts.cs
- FontSource.cs
- HttpPostedFile.cs
- NavigatorInput.cs
- DictionaryEntry.cs
- SolidColorBrush.cs
- CodeMethodInvokeExpression.cs
- NullableLongSumAggregationOperator.cs
- HttpListenerResponse.cs
- Parallel.cs
- TiffBitmapDecoder.cs
- ScriptIgnoreAttribute.cs
- SessionSwitchEventArgs.cs
- login.cs
- ObjectCloneHelper.cs
- PrtCap_Builder.cs
- DetectEofStream.cs
- HtmlFormParameterReader.cs
- PropertyCollection.cs
- XmlTextReaderImpl.cs
- Win32SafeHandles.cs
- ExportException.cs
- DrawingContextWalker.cs
- Overlapped.cs
- FormViewPagerRow.cs
- TreeBuilder.cs
- FormViewModeEventArgs.cs
- ReadOnlyState.cs
- StringFreezingAttribute.cs
- RuntimeConfig.cs
- WebEncodingValidator.cs
- HttpWebResponse.cs
- CaseDesigner.xaml.cs
- Preprocessor.cs
- EasingKeyFrames.cs
- CheckBoxFlatAdapter.cs
- EraserBehavior.cs
- FontUnitConverter.cs
- SmiRequestExecutor.cs
- Misc.cs
- RectangleConverter.cs
- AccessDataSourceView.cs
- DebugView.cs
- ButtonAutomationPeer.cs
- SqlDataSourceCache.cs
- ApplicationInfo.cs
- CodeAttributeArgument.cs
- DataGridViewComboBoxEditingControl.cs
- XPathDocumentNavigator.cs
- FileDialogPermission.cs
- TemplatePropertyEntry.cs
- DataPagerFieldItem.cs
- basenumberconverter.cs
- ParallelLoopState.cs
- SqlDataSourceQueryEditorForm.cs
- ManipulationBoundaryFeedbackEventArgs.cs
- CssClassPropertyAttribute.cs
- LogStore.cs
- ParentUndoUnit.cs
- IDQuery.cs
- CodeObjectCreateExpression.cs
- XPathDocumentIterator.cs
- CompletedAsyncResult.cs
- BamlWriter.cs
- EUCJPEncoding.cs
- FileStream.cs
- FixedElement.cs
- StackSpiller.Generated.cs
- XhtmlTextWriter.cs
- TerminatorSinks.cs
- MsmqNonTransactedPoisonHandler.cs
- SQLConvert.cs