Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Framework / System / Windows / Controls / Primitives / DragStartedEventArgs.cs / 1 / 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
- ReferenceEqualityComparer.cs
- KnownIds.cs
- SequenceNumber.cs
- OperatingSystem.cs
- MoveSizeWinEventHandler.cs
- WebBrowserSiteBase.cs
- ParentQuery.cs
- ColorAnimation.cs
- RenderDataDrawingContext.cs
- QuaternionIndependentAnimationStorage.cs
- ThreadAttributes.cs
- GlyphInfoList.cs
- Identifier.cs
- HttpCapabilitiesSectionHandler.cs
- StateManagedCollection.cs
- ApplicationContext.cs
- ClientOperation.cs
- VBIdentifierTrimConverter.cs
- TabControlEvent.cs
- MenuCommandsChangedEventArgs.cs
- IImplicitResourceProvider.cs
- EnumBuilder.cs
- ConfigurationElementProperty.cs
- NavigationPropertyEmitter.cs
- Events.cs
- VisualStateGroup.cs
- CanonicalXml.cs
- ConfigXmlSignificantWhitespace.cs
- DateTimeParse.cs
- MessageSmuggler.cs
- MonthCalendar.cs
- CryptoApi.cs
- DbConnectionStringBuilder.cs
- ContentType.cs
- DefaultParameterValueAttribute.cs
- BinaryFormatterWriter.cs
- SerializationException.cs
- FileReader.cs
- _TLSstream.cs
- InputScope.cs
- ConfigurationElementProperty.cs
- SqlConnectionPoolGroupProviderInfo.cs
- HtmlLink.cs
- RSAPKCS1KeyExchangeFormatter.cs
- FileIOPermission.cs
- Vector3D.cs
- DBParameter.cs
- Soap11ServerProtocol.cs
- filewebrequest.cs
- NavigationWindowAutomationPeer.cs
- DynamicDataRoute.cs
- GregorianCalendar.cs
- SessionPageStatePersister.cs
- ToolStripItem.cs
- ProgressBarAutomationPeer.cs
- EventLogTraceListener.cs
- TextChangedEventArgs.cs
- FolderBrowserDialog.cs
- ModelServiceImpl.cs
- linebase.cs
- DataGridRowClipboardEventArgs.cs
- BaseTemplateCodeDomTreeGenerator.cs
- SystemUnicastIPAddressInformation.cs
- ILGenerator.cs
- BaseAppDomainProtocolHandler.cs
- CodeCatchClause.cs
- CollectionViewGroup.cs
- DataStreams.cs
- _UriSyntax.cs
- X509Certificate2.cs
- TemplatePartAttribute.cs
- followingsibling.cs
- UserPreferenceChangedEventArgs.cs
- NumberAction.cs
- Misc.cs
- TransformPatternIdentifiers.cs
- Bitmap.cs
- DataServiceKeyAttribute.cs
- PeerObject.cs
- ShortcutKeysEditor.cs
- XmlCodeExporter.cs
- AsyncOperationManager.cs
- NamedElement.cs
- ConnectionManager.cs
- ResourceContainer.cs
- documentsequencetextcontainer.cs
- COM2PropertyDescriptor.cs
- CacheOutputQuery.cs
- TextSerializer.cs
- DataBoundControlHelper.cs
- BaseHashHelper.cs
- ProtocolImporter.cs
- DefaultValueAttribute.cs
- UpDownBaseDesigner.cs
- MultiByteCodec.cs
- PageClientProxyGenerator.cs
- ToolStripPanelRow.cs
- XmlSchemaObject.cs
- MeasurementDCInfo.cs
- GridViewCommandEventArgs.cs