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
- ResourceProviderFactory.cs
- NegotiationTokenAuthenticatorStateCache.cs
- MultiPageTextView.cs
- XmlUtil.cs
- XmlDocument.cs
- FreezableCollection.cs
- ContextProperty.cs
- AliasExpr.cs
- BrowserTree.cs
- VersionConverter.cs
- ScalarConstant.cs
- LeftCellWrapper.cs
- RsaSecurityTokenParameters.cs
- EventlogProvider.cs
- TemplateKey.cs
- DLinqTableProvider.cs
- GraphicsPath.cs
- ObjectItemAttributeAssemblyLoader.cs
- Visual3DCollection.cs
- MatrixTransform3D.cs
- ReadOnlyDataSource.cs
- SubordinateTransaction.cs
- GPRECT.cs
- PolygonHotSpot.cs
- Rotation3DKeyFrameCollection.cs
- BitmapVisualManager.cs
- FrameworkRichTextComposition.cs
- UrlEncodedParameterWriter.cs
- _HelperAsyncResults.cs
- NamespaceExpr.cs
- ModuleElement.cs
- ByteFacetDescriptionElement.cs
- GeneralTransform.cs
- NumericExpr.cs
- CaseDesigner.xaml.cs
- cookiecontainer.cs
- SoapTypeAttribute.cs
- SpecularMaterial.cs
- BaseResourcesBuildProvider.cs
- RouteParser.cs
- VectorAnimationBase.cs
- EasingKeyFrames.cs
- RegisteredArrayDeclaration.cs
- XmlSchemaException.cs
- FormatSettings.cs
- BrowserTree.cs
- ProcessThread.cs
- DocumentPage.cs
- WebEvents.cs
- SyntaxCheck.cs
- SafeNativeMethodsMilCoreApi.cs
- DbConnectionStringBuilder.cs
- AsymmetricAlgorithm.cs
- FrameworkEventSource.cs
- Tokenizer.cs
- HttpResponseInternalBase.cs
- CommandExpr.cs
- OutOfProcStateClientManager.cs
- NavigationEventArgs.cs
- StylusEventArgs.cs
- FacetDescription.cs
- COM2Properties.cs
- DetailsViewPageEventArgs.cs
- DesignerInterfaces.cs
- AttributeData.cs
- CanonicalFormWriter.cs
- EdmProviderManifest.cs
- XNameConverter.cs
- Enum.cs
- DrawingBrush.cs
- SimpleRecyclingCache.cs
- AsyncCompletedEventArgs.cs
- MonitorWrapper.cs
- MissingFieldException.cs
- XmlSchemaSimpleTypeRestriction.cs
- DefinitionUpdate.cs
- WmpBitmapDecoder.cs
- InkCanvasSelection.cs
- DetailsViewInsertEventArgs.cs
- NativeMethods.cs
- XmlAttributeOverrides.cs
- DropShadowBitmapEffect.cs
- VScrollProperties.cs
- ConnectorRouter.cs
- ExpressionBinding.cs
- ConfigurationElement.cs
- BinaryConverter.cs
- InputBuffer.cs
- ComEventsMethod.cs
- InternalRelationshipCollection.cs
- HtmlButton.cs
- CharUnicodeInfo.cs
- MetadataCache.cs
- NullableDecimalSumAggregationOperator.cs
- EntryPointNotFoundException.cs
- SqlClientFactory.cs
- GeneralTransform3DGroup.cs
- QueryHandler.cs
- ObjectConverter.cs
- InteropAutomationProvider.cs