Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / Primitives / DragStartedEventArgs.cs / 1305600 / DragStartedEventArgs.cs
using System; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows; namespace System.Windows.Controls.Primitives { ////// This DragStartedEventArgs class contains additional information about the /// DragStarted event. /// ////// public class DragStartedEventArgs: RoutedEventArgs { /// /// This is an instance constructor for the DragStartedEventArgs class. It /// is constructed with a reference to the event being raised. /// ///Nothing. public DragStartedEventArgs(double horizontalOffset, double verticalOffset) : base() { _horizontalOffset = horizontalOffset; _verticalOffset = verticalOffset; RoutedEvent=Thumb.DragStartedEvent; } ////// Read-only access to the horizontal offset (relative to Thumb's co-ordinate). /// public double HorizontalOffset { get { return _horizontalOffset; } } ////// Read-only access to the vertical offset (relative to Thumb's co-ordinate). /// public double VerticalOffset { get { return _verticalOffset; } } ////// This method is used to perform the proper type casting in order to /// call the type-safe DragStartedEventHandler delegate for the DragStartedEvent event. /// /// The handler to invoke. /// The current object along the event's route. ///Nothing. ////// protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget) { DragStartedEventHandler handler = (DragStartedEventHandler)genericHandler; handler(genericTarget, this); } private double _horizontalOffset; private double _verticalOffset; } /// /// This delegate must used by handlers of the DragStarted event. /// /// The current element along the event's route. /// The event arguments containing additional information about the event. ///Nothing. public delegate void DragStartedEventHandler(object sender, DragStartedEventArgs e); } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows; namespace System.Windows.Controls.Primitives { ////// This DragStartedEventArgs class contains additional information about the /// DragStarted event. /// ////// public class DragStartedEventArgs: RoutedEventArgs { /// /// This is an instance constructor for the DragStartedEventArgs class. It /// is constructed with a reference to the event being raised. /// ///Nothing. public DragStartedEventArgs(double horizontalOffset, double verticalOffset) : base() { _horizontalOffset = horizontalOffset; _verticalOffset = verticalOffset; RoutedEvent=Thumb.DragStartedEvent; } ////// Read-only access to the horizontal offset (relative to Thumb's co-ordinate). /// public double HorizontalOffset { get { return _horizontalOffset; } } ////// Read-only access to the vertical offset (relative to Thumb's co-ordinate). /// public double VerticalOffset { get { return _verticalOffset; } } ////// This method is used to perform the proper type casting in order to /// call the type-safe DragStartedEventHandler delegate for the DragStartedEvent event. /// /// The handler to invoke. /// The current object along the event's route. ///Nothing. ////// protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget) { DragStartedEventHandler handler = (DragStartedEventHandler)genericHandler; handler(genericTarget, this); } private double _horizontalOffset; private double _verticalOffset; } /// /// This delegate must used by handlers of the DragStarted event. /// /// The current element along the event's route. /// The event arguments containing additional information about the event. ///Nothing. public delegate void DragStartedEventHandler(object sender, DragStartedEventArgs e); } // 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
- jithelpers.cs
- xml.cs
- Repeater.cs
- DefaultTextStoreTextComposition.cs
- PeerSecurityHelpers.cs
- Normalization.cs
- DataGridViewCellPaintingEventArgs.cs
- SafeEventLogWriteHandle.cs
- BrushConverter.cs
- ThicknessAnimationUsingKeyFrames.cs
- BinaryExpressionHelper.cs
- CharacterBufferReference.cs
- RpcResponse.cs
- EventSinkHelperWriter.cs
- ObjectComplexPropertyMapping.cs
- DesignerVerb.cs
- ChineseLunisolarCalendar.cs
- StringWriter.cs
- CodeNamespaceImport.cs
- OpenFileDialog.cs
- HtmlLink.cs
- TableChangeProcessor.cs
- OdbcDataReader.cs
- SqlFacetAttribute.cs
- COAUTHINFO.cs
- ProviderConnectionPointCollection.cs
- sqlpipe.cs
- SqlColumnizer.cs
- InternalBase.cs
- ScaleTransform3D.cs
- ellipse.cs
- EncryptedXml.cs
- DataRow.cs
- Freezable.cs
- X509ScopedServiceCertificateElementCollection.cs
- xdrvalidator.cs
- DispatcherExceptionEventArgs.cs
- DataGridItemAutomationPeer.cs
- RequestUriProcessor.cs
- DesignerAttribute.cs
- SplitterEvent.cs
- _FixedSizeReader.cs
- GC.cs
- AddingNewEventArgs.cs
- Model3D.cs
- DataPager.cs
- Accessible.cs
- RtfControlWordInfo.cs
- GeometryDrawing.cs
- SerialPinChanges.cs
- DataGridViewRowStateChangedEventArgs.cs
- GeneralTransform3DCollection.cs
- GridToolTip.cs
- FileInfo.cs
- LicenseProviderAttribute.cs
- Stopwatch.cs
- WebBrowserProgressChangedEventHandler.cs
- HybridDictionary.cs
- WindowsListViewScroll.cs
- ILGenerator.cs
- GenerateHelper.cs
- QilNode.cs
- SoapCodeExporter.cs
- Assembly.cs
- SemaphoreFullException.cs
- RowsCopiedEventArgs.cs
- InfoCardAsymmetricCrypto.cs
- MbpInfo.cs
- ContentTextAutomationPeer.cs
- FrameAutomationPeer.cs
- TrackingWorkflowEventArgs.cs
- FormViewPageEventArgs.cs
- TdsValueSetter.cs
- CodeAccessSecurityEngine.cs
- DisplayInformation.cs
- ResetableIterator.cs
- XmlSchemaParticle.cs
- ObjectManager.cs
- ServiceDesigner.cs
- ErrorHandler.cs
- ObjectSecurityT.cs
- CodeGeneratorOptions.cs
- WhitespaceRule.cs
- TrustLevelCollection.cs
- XmlCharType.cs
- OutputScopeManager.cs
- XmlnsCompatibleWithAttribute.cs
- VisualStateManager.cs
- ToolboxComponentsCreatedEventArgs.cs
- KeyValuePair.cs
- ToolStripDropDownMenu.cs
- EdmFunctions.cs
- ApplicationFileCodeDomTreeGenerator.cs
- SQLGuid.cs
- DeviceContexts.cs
- PropertyDescriptorComparer.cs
- RelationshipEndMember.cs
- RichTextBox.cs
- PriorityRange.cs
- SectionInformation.cs