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
- ResourceReferenceExpressionConverter.cs
- WebColorConverter.cs
- Win32MouseDevice.cs
- IssuanceTokenProviderBase.cs
- ApplicationServiceManager.cs
- MobilePage.cs
- XmlDataCollection.cs
- IdnMapping.cs
- ConfigurationStrings.cs
- BitmapPalettes.cs
- WebMessageEncodingBindingElement.cs
- Base64Encoder.cs
- SQLDateTime.cs
- SecurityCriticalDataForSet.cs
- UpdateExpressionVisitor.cs
- ResourceExpression.cs
- ControlEvent.cs
- RenderingEventArgs.cs
- PageBreakRecord.cs
- SchemaDeclBase.cs
- TagMapInfo.cs
- ComponentChangingEvent.cs
- TraceRecord.cs
- XPathPatternParser.cs
- BasePattern.cs
- Tuple.cs
- TableAutomationPeer.cs
- ServicesExceptionNotHandledEventArgs.cs
- WindowsListViewGroupSubsetLink.cs
- ActionMismatchAddressingException.cs
- ExpressionPrefixAttribute.cs
- ParameterElementCollection.cs
- brushes.cs
- Overlapped.cs
- Native.cs
- ScriptingWebServicesSectionGroup.cs
- PenLineCapValidation.cs
- ScriptMethodAttribute.cs
- XhtmlConformanceSection.cs
- ResourceType.cs
- ChannelEndpointElementCollection.cs
- DbConnectionPoolGroupProviderInfo.cs
- WebPartsPersonalization.cs
- TextBox.cs
- OdbcEnvironment.cs
- behaviorssection.cs
- SimpleRecyclingCache.cs
- TreeNode.cs
- ButtonPopupAdapter.cs
- InvokeMethodActivity.cs
- DictationGrammar.cs
- SqlComparer.cs
- ZipIOCentralDirectoryBlock.cs
- CngKeyBlobFormat.cs
- HijriCalendar.cs
- HyperLinkStyle.cs
- SecurityState.cs
- XPathQilFactory.cs
- PermissionSetTriple.cs
- XmlProcessingInstruction.cs
- VirtualizingPanel.cs
- DataGridViewCell.cs
- HashCoreRequest.cs
- MethodToken.cs
- DefaultIfEmptyQueryOperator.cs
- HtmlTextArea.cs
- ListSortDescription.cs
- TypeExtension.cs
- documentsequencetextpointer.cs
- PenCursorManager.cs
- XdrBuilder.cs
- FolderBrowserDialog.cs
- WorkflowServiceInstance.cs
- CngProperty.cs
- ObjectDataSourceFilteringEventArgs.cs
- HttpHandlersSection.cs
- AuthenticationManager.cs
- NameSpaceExtractor.cs
- MULTI_QI.cs
- CacheOutputQuery.cs
- ItemList.cs
- InputReport.cs
- AutomationEvent.cs
- EmptyStringExpandableObjectConverter.cs
- AspNetHostingPermission.cs
- CustomCategoryAttribute.cs
- CommonDialog.cs
- SymbolMethod.cs
- ItemAutomationPeer.cs
- EastAsianLunisolarCalendar.cs
- SapiInterop.cs
- RectConverter.cs
- SrgsElementList.cs
- UtilityExtension.cs
- BoolExpressionVisitors.cs
- OracleRowUpdatingEventArgs.cs
- ConfigurationElement.cs
- ComPlusContractBehavior.cs
- FixedHyperLink.cs
- FormViewAutoFormat.cs