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
- TransformValueSerializer.cs
- IMembershipProvider.cs
- PeerNearMe.cs
- TemplateBindingExtensionConverter.cs
- ProcessHostMapPath.cs
- NegotiationTokenProvider.cs
- BamlRecordHelper.cs
- GlobalEventManager.cs
- TextEditorLists.cs
- HtmlAnchor.cs
- ILGen.cs
- FormsAuthenticationUser.cs
- Activity.cs
- SimpleWorkerRequest.cs
- ToolStripItemRenderEventArgs.cs
- FormsAuthenticationCredentials.cs
- TableCellAutomationPeer.cs
- NativeMethods.cs
- SQLResource.cs
- MasterPage.cs
- _Win32.cs
- XmlnsDictionary.cs
- AudioBase.cs
- StyleHelper.cs
- WindowsHyperlink.cs
- XmlException.cs
- WindowsListViewGroup.cs
- LongCountAggregationOperator.cs
- PrintControllerWithStatusDialog.cs
- FragmentQuery.cs
- XsdBuilder.cs
- DataColumnMapping.cs
- QueryTask.cs
- FormsAuthenticationCredentials.cs
- ObjectStateFormatter.cs
- SoapAttributeAttribute.cs
- ListMarkerLine.cs
- XamlPointCollectionSerializer.cs
- DataServiceBuildProvider.cs
- Vector3DAnimation.cs
- ExpressionsCollectionConverter.cs
- ProcessHost.cs
- DrawingContext.cs
- TimeSpanValidatorAttribute.cs
- MetadataArtifactLoaderFile.cs
- Highlights.cs
- XsltOutput.cs
- PageStatePersister.cs
- ImportException.cs
- DescendentsWalker.cs
- DataSetMappper.cs
- DateTimeOffset.cs
- clipboard.cs
- WmfPlaceableFileHeader.cs
- RadioButton.cs
- XmlSerializerSection.cs
- XmlSerializationWriter.cs
- EndPoint.cs
- ProcessThreadCollection.cs
- RequestSecurityTokenForRemoteTokenFactory.cs
- HMAC.cs
- DoubleIndependentAnimationStorage.cs
- InfoCardSymmetricAlgorithm.cs
- XmlSerializationWriter.cs
- XmlNodeChangedEventArgs.cs
- SelectedCellsChangedEventArgs.cs
- RepeatBehaviorConverter.cs
- SchemaName.cs
- TableDetailsRow.cs
- WebPartEditorApplyVerb.cs
- DataSourceExpression.cs
- VirtualPath.cs
- InternalPolicyElement.cs
- ItemList.cs
- AttachedProperty.cs
- TraceUtility.cs
- DecoderFallbackWithFailureFlag.cs
- ContentType.cs
- Selector.cs
- DataAdapter.cs
- ObjectDataSourceSelectingEventArgs.cs
- ConfigXmlCDataSection.cs
- TraceSource.cs
- SrgsDocument.cs
- WhitespaceRule.cs
- TextTreeDeleteContentUndoUnit.cs
- TypeBuilder.cs
- BackStopAuthenticationModule.cs
- GeometryConverter.cs
- ConnectionInterfaceCollection.cs
- Camera.cs
- GlobalAllocSafeHandle.cs
- XamlTemplateSerializer.cs
- StorageEndPropertyMapping.cs
- MailDefinition.cs
- EUCJPEncoding.cs
- ClientUrlResolverWrapper.cs
- XPathAxisIterator.cs
- ServiceNotStartedException.cs
- UnaryQueryOperator.cs