Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WpfWebRequestHelper.cs
- SystemColors.cs
- EntityFunctions.cs
- LinqDataSource.cs
- DataFormats.cs
- sortedlist.cs
- OleDbDataReader.cs
- Table.cs
- DetailsViewRow.cs
- PrintDocument.cs
- PageAsyncTask.cs
- Compress.cs
- EventWaitHandle.cs
- Int32CAMarshaler.cs
- DataPointer.cs
- WebHttpElement.cs
- InstallerTypeAttribute.cs
- EmptyEnumerable.cs
- ModifierKeysConverter.cs
- JournalEntryStack.cs
- Blend.cs
- PageStatePersister.cs
- MulticastIPAddressInformationCollection.cs
- WrapPanel.cs
- XmlSchemaExporter.cs
- SqlDataSourceCustomCommandPanel.cs
- XsdBuilder.cs
- _CookieModule.cs
- Convert.cs
- MyContact.cs
- CollectionContainer.cs
- Compiler.cs
- NetDataContractSerializer.cs
- ConfigurationSectionGroupCollection.cs
- WebPartMovingEventArgs.cs
- ConnectionStringsExpressionBuilder.cs
- DataSourceExpressionCollection.cs
- AssemblyBuilderData.cs
- TickBar.cs
- IncrementalHitTester.cs
- NotifyIcon.cs
- QilFunction.cs
- DateTimeUtil.cs
- COM2ExtendedTypeConverter.cs
- CacheSection.cs
- TypefaceMap.cs
- GridToolTip.cs
- ToolStripButton.cs
- DbMetaDataCollectionNames.cs
- WebResponse.cs
- DataControlFieldCell.cs
- RegistryPermission.cs
- SettingsPropertyCollection.cs
- WebPartMovingEventArgs.cs
- VirtualPath.cs
- LineSegment.cs
- DbMetaDataCollectionNames.cs
- PathGeometry.cs
- Rfc4050KeyFormatter.cs
- CmsInterop.cs
- HttpListenerException.cs
- Speller.cs
- WindowsFormsHostAutomationPeer.cs
- EasingQuaternionKeyFrame.cs
- ExcCanonicalXml.cs
- WindowsTooltip.cs
- COM2PropertyDescriptor.cs
- XmlValueConverter.cs
- BamlLocalizer.cs
- EventLogException.cs
- Variable.cs
- IPeerNeighbor.cs
- DataSysAttribute.cs
- GridViewDeletedEventArgs.cs
- ToolBarButtonDesigner.cs
- SynchronousChannelMergeEnumerator.cs
- _NegoState.cs
- HttpProfileGroupBase.cs
- BasicCellRelation.cs
- CommentEmitter.cs
- HttpContext.cs
- FreezableOperations.cs
- RegisteredScript.cs
- ContextMenu.cs
- DependencyObjectType.cs
- InvokeGenerator.cs
- NamedPipeTransportManager.cs
- WebScriptClientGenerator.cs
- WindowsEditBox.cs
- BCLDebug.cs
- ListBoxAutomationPeer.cs
- SettingsPropertyWrongTypeException.cs
- NativeMethods.cs
- XmlTextEncoder.cs
- MemoryFailPoint.cs
- PostBackOptions.cs
- ServiceOperationInvoker.cs
- SlipBehavior.cs
- XmlCharType.cs
- SearchExpression.cs