Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / 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 : 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. //---------------------------------------------------------------------------- // // 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
- PhysicalOps.cs
- WindowsTreeView.cs
- Msec.cs
- PageBuildProvider.cs
- Decorator.cs
- OleDbWrapper.cs
- PropertyDescriptorGridEntry.cs
- SpinWait.cs
- ComponentGuaranteesAttribute.cs
- DiscoveryInnerClientManaged11.cs
- SafeIUnknown.cs
- Int16AnimationBase.cs
- SharedDp.cs
- DataGridViewTextBoxEditingControl.cs
- SettingsAttributes.cs
- TextFormatter.cs
- TabControlAutomationPeer.cs
- InnerItemCollectionView.cs
- SerializerProvider.cs
- Symbol.cs
- _ConnectStream.cs
- NullableDoubleSumAggregationOperator.cs
- TypeConstant.cs
- DbMetaDataFactory.cs
- BulletedListEventArgs.cs
- SignedXmlDebugLog.cs
- MenuItemStyleCollection.cs
- ProviderConnectionPoint.cs
- contentDescriptor.cs
- InvokePattern.cs
- SiteIdentityPermission.cs
- EnumUnknown.cs
- Matrix3D.cs
- Win32Exception.cs
- WsatTransactionInfo.cs
- ColumnResizeAdorner.cs
- ExecutionScope.cs
- StreamingContext.cs
- SimplePropertyEntry.cs
- DPTypeDescriptorContext.cs
- DataGridViewElement.cs
- Logging.cs
- DetailsViewModeEventArgs.cs
- uribuilder.cs
- UInt32.cs
- CodeArrayIndexerExpression.cs
- XmlWriterSettings.cs
- PrtCap_Base.cs
- mediaclock.cs
- ListenerConnectionModeReader.cs
- DynamicScriptObject.cs
- PreviewPrintController.cs
- PeerNameResolver.cs
- BitVec.cs
- DetailsViewInsertEventArgs.cs
- DataKey.cs
- AppDomainUnloadedException.cs
- ListViewUpdateEventArgs.cs
- SqlTopReducer.cs
- DocumentAutomationPeer.cs
- DBSqlParserColumn.cs
- BamlWriter.cs
- ProfileEventArgs.cs
- TransformCryptoHandle.cs
- DataGridViewColumnStateChangedEventArgs.cs
- SymbolResolver.cs
- PageThemeParser.cs
- ChildrenQuery.cs
- CodeTypeReference.cs
- FormClosingEvent.cs
- RoutingBehavior.cs
- ListViewInsertionMark.cs
- EventLogConfiguration.cs
- TokenBasedSetEnumerator.cs
- EnumerableCollectionView.cs
- UriTemplateMatchException.cs
- ACL.cs
- WebBrowserEvent.cs
- Blend.cs
- UrlMappingsModule.cs
- ObsoleteAttribute.cs
- HttpPostedFileWrapper.cs
- RequiredAttributeAttribute.cs
- ArraySet.cs
- WebPartConnectionCollection.cs
- XmlFormatExtensionAttribute.cs
- CustomError.cs
- Domain.cs
- OutputCacheSettings.cs
- SqlCharStream.cs
- WebBrowserProgressChangedEventHandler.cs
- SpellCheck.cs
- TextEffect.cs
- LocalValueEnumerator.cs
- DataControlImageButton.cs
- WeakEventManager.cs
- Propagator.JoinPropagator.cs
- WebReferencesBuildProvider.cs
- HorizontalAlignConverter.cs
- CollectionContainer.cs