Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / Behavior / ToolboxSnapDragDropEventArgs.cs / 1 / ToolboxSnapDragDropEventArgs.cs
namespace System.Windows.Forms.Design.Behavior { using System; using System.Collections; using System.ComponentModel; using System.ComponentModel.Design; using System.Design; using System.Diagnostics; using System.Drawing; using System.Windows.Forms.Design; ////// /// This class is created by the ToolboxItemSnapLineBehavior when the /// user clicks, drags, and drops a control from the toolbox. This class /// adds value to the standard DragEventArgs by holding information /// about how the user snapped a control when it was dropped. We'll /// use this information in ParentControlDesigner when this new control /// is created to properly position and size the new control. /// internal sealed class ToolboxSnapDragDropEventArgs : DragEventArgs { private SnapDirection snapDirections;//direction in which the user's cursor was snapped private Point offset;//offset from the cursor to our 'drag box' ////// /// Constructor that is called when the user drops - here, we'll essentially /// push the original drag event info down to the base class and store off /// our direction and offset. /// public ToolboxSnapDragDropEventArgs(SnapDirection snapDirections, Point offset, DragEventArgs origArgs) : base (origArgs.Data, origArgs.KeyState, origArgs.X, origArgs.Y, origArgs.AllowedEffect, origArgs.Effect) { this.snapDirections = snapDirections; this.offset = offset; } ////// /// This is the last direction that the user was snapped to directly before /// the drop happened... /// public SnapDirection SnapDirections { get { return snapDirections; } } ////// /// The offset in pixel between the mouse cursor (at time of drop) and the /// 'drag box' that is dancing around and snapping to other components. /// public Point Offset { get { return offset; } } ////// /// Flag enum used to define the different directions a 'drag box' could be /// snapped to. /// [Flags] public enum SnapDirection { None = 0x00, Top = 0x01, Bottom = 0x02, Right = 0x04, Left = 0x08 } } } // 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
- RouteValueExpressionBuilder.cs
- _AutoWebProxyScriptWrapper.cs
- embossbitmapeffect.cs
- AnnouncementInnerClientCD1.cs
- DispatchRuntime.cs
- TextElementEnumerator.cs
- DiscreteKeyFrames.cs
- XamlTreeBuilderBamlRecordWriter.cs
- ClassicBorderDecorator.cs
- ValidationPropertyAttribute.cs
- EntryIndex.cs
- DataTableExtensions.cs
- odbcmetadatafactory.cs
- Input.cs
- ValidationHelpers.cs
- CheckPair.cs
- MsmqInputChannelListener.cs
- PreloadHost.cs
- MenuItemAutomationPeer.cs
- PresentationAppDomainManager.cs
- DataSvcMapFileSerializer.cs
- TextRangeEditLists.cs
- PartitionerQueryOperator.cs
- HelpProvider.cs
- XmlHierarchyData.cs
- DataBoundControlHelper.cs
- HtmlContainerControl.cs
- CalendarDataBindingHandler.cs
- PropertyTabAttribute.cs
- WorkflowMarkupSerializerMapping.cs
- XmlSerializerNamespaces.cs
- ToolStripButton.cs
- sqlpipe.cs
- PolyLineSegmentFigureLogic.cs
- NativeObjectSecurity.cs
- Wizard.cs
- Scene3D.cs
- CodeDOMProvider.cs
- TextElementEnumerator.cs
- XmlNodeComparer.cs
- UrlPath.cs
- ServiceParser.cs
- SettingsPropertyValue.cs
- AnimationLayer.cs
- ObjectTag.cs
- ClientScriptManagerWrapper.cs
- _emptywebproxy.cs
- ErrorEventArgs.cs
- CriticalHandle.cs
- CodeCompiler.cs
- RemoteDebugger.cs
- ServiceAuthorizationElement.cs
- EntityDataSourceStatementEditorForm.cs
- TaskResultSetter.cs
- DataSourceXmlSerializationAttribute.cs
- AppSettingsReader.cs
- ByteConverter.cs
- IntPtr.cs
- NavigationExpr.cs
- DoWorkEventArgs.cs
- AudioDeviceOut.cs
- OrderedDictionary.cs
- DomNameTable.cs
- InvalidDataException.cs
- AutomationPropertyInfo.cs
- TextRangeAdaptor.cs
- StringReader.cs
- WorkflowRuntime.cs
- HtmlInputFile.cs
- PeerEndPoint.cs
- XmlResolver.cs
- SchemaInfo.cs
- SHA256.cs
- ComboBox.cs
- FontFamilyValueSerializer.cs
- PathParser.cs
- TableLayoutSettingsTypeConverter.cs
- Parameter.cs
- XmlAttributeOverrides.cs
- AttributeCollection.cs
- JoinCqlBlock.cs
- TreePrinter.cs
- prefixendpointaddressmessagefiltertable.cs
- StaticTextPointer.cs
- _UncName.cs
- storepermission.cs
- SqlDelegatedTransaction.cs
- UserControlParser.cs
- ApplicationSecurityManager.cs
- wmiprovider.cs
- RowToParametersTransformer.cs
- XmlSchemaInfo.cs
- CodeArrayIndexerExpression.cs
- IndependentAnimationStorage.cs
- ClassicBorderDecorator.cs
- IConvertible.cs
- GPPOINT.cs
- SapiRecognizer.cs
- ErrorProvider.cs
- XmlQuerySequence.cs