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
- WindowPatternIdentifiers.cs
- SqlTriggerContext.cs
- ByteStorage.cs
- UnsignedPublishLicense.cs
- MemberMaps.cs
- CheckPair.cs
- NavigationProperty.cs
- SystemIcons.cs
- ProtocolsConfiguration.cs
- CardSpaceShim.cs
- OptimalBreakSession.cs
- RSATokenProvider.cs
- AttributeCollection.cs
- GlobalizationAssembly.cs
- RuleSetBrowserDialog.cs
- XmlSubtreeReader.cs
- KeySplineConverter.cs
- MonitorWrapper.cs
- UIAgentCrashedException.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- XNodeValidator.cs
- EventProviderClassic.cs
- SymDocumentType.cs
- XamlSerializationHelper.cs
- ObfuscateAssemblyAttribute.cs
- ToolStripItemClickedEventArgs.cs
- BufferedStream2.cs
- PersonalizationAdministration.cs
- IntSumAggregationOperator.cs
- storepermissionattribute.cs
- WebSysDisplayNameAttribute.cs
- GridPattern.cs
- CngKeyBlobFormat.cs
- XmlExtensionFunction.cs
- Storyboard.cs
- QueryCacheManager.cs
- MonthChangedEventArgs.cs
- SiteMapNodeCollection.cs
- IItemProperties.cs
- SerialErrors.cs
- TaiwanCalendar.cs
- CatalogZoneBase.cs
- HuffmanTree.cs
- Baml2006SchemaContext.cs
- CommandValueSerializer.cs
- HttpApplication.cs
- MetadataWorkspace.cs
- XmlSchemaAnyAttribute.cs
- HtmlInputControl.cs
- FieldMetadata.cs
- BufferedMessageWriter.cs
- XPathAncestorQuery.cs
- Drawing.cs
- CodeParameterDeclarationExpressionCollection.cs
- TextEndOfParagraph.cs
- DataRecordInfo.cs
- TextServicesContext.cs
- CurrencyWrapper.cs
- XpsDocumentEvent.cs
- ToolBar.cs
- DataBindEngine.cs
- CounterCreationData.cs
- InvokeGenerator.cs
- DataListItemEventArgs.cs
- OdbcCommand.cs
- ListItemConverter.cs
- DataSourceHelper.cs
- PropertyMapper.cs
- ISAPIRuntime.cs
- Int32AnimationBase.cs
- ChtmlCalendarAdapter.cs
- ScriptIgnoreAttribute.cs
- ServicePointManagerElement.cs
- UrlPath.cs
- WindowsFormsHostPropertyMap.cs
- PointCollection.cs
- graph.cs
- InfoCardProofToken.cs
- shaperfactoryquerycacheentry.cs
- ImageFormatConverter.cs
- LinqDataSourceInsertEventArgs.cs
- GestureRecognizer.cs
- OpenTypeCommon.cs
- DefaultObjectMappingItemCollection.cs
- WebControlParameterProxy.cs
- TiffBitmapEncoder.cs
- PropertyIDSet.cs
- RemoveStoryboard.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- MailHeaderInfo.cs
- sqlcontext.cs
- StorageComplexTypeMapping.cs
- MinimizableAttributeTypeConverter.cs
- TimeSpanOrInfiniteConverter.cs
- AccessedThroughPropertyAttribute.cs
- categoryentry.cs
- WSFederationHttpSecurityElement.cs
- SafeSecurityHelper.cs
- CustomErrorCollection.cs
- CodeVariableDeclarationStatement.cs