Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- ResourcePermissionBaseEntry.cs
- SQLDoubleStorage.cs
- WebPartVerbCollection.cs
- IdentityReference.cs
- DbDataRecord.cs
- LockedHandleGlyph.cs
- XPathBuilder.cs
- GeneratedView.cs
- BreakSafeBase.cs
- FileSystemWatcher.cs
- NotificationContext.cs
- UserNameSecurityTokenProvider.cs
- RSAOAEPKeyExchangeFormatter.cs
- HitTestWithGeometryDrawingContextWalker.cs
- Header.cs
- UDPClient.cs
- GenericTypeParameterConverter.cs
- ItemAutomationPeer.cs
- InputProcessorProfilesLoader.cs
- Brush.cs
- ExpandSegment.cs
- FontStretchConverter.cs
- ObjectPersistData.cs
- CompareInfo.cs
- SiteMapDataSource.cs
- UrlSyndicationContent.cs
- SelectorItemAutomationPeer.cs
- SqlXml.cs
- ObjectIDGenerator.cs
- ProfilePropertyNameValidator.cs
- Int32Rect.cs
- XmlQueryCardinality.cs
- Frame.cs
- DateBoldEvent.cs
- DataControlCommands.cs
- KeyValueConfigurationElement.cs
- QueryAccessibilityHelpEvent.cs
- XmlSerializationGeneratedCode.cs
- SessionState.cs
- PenThread.cs
- UriTemplateLiteralQueryValue.cs
- HttpCookiesSection.cs
- WorkflowApplicationTerminatedException.cs
- RowToFieldTransformer.cs
- WebBrowsableAttribute.cs
- ListView.cs
- XmlNamespaceMappingCollection.cs
- View.cs
- XmlNavigatorStack.cs
- XmlILOptimizerVisitor.cs
- TabItem.cs
- FocusTracker.cs
- FontCollection.cs
- DurableInstanceProvider.cs
- HttpException.cs
- ResetableIterator.cs
- TextDecorationCollection.cs
- ProfileServiceManager.cs
- TextureBrush.cs
- DbProviderFactories.cs
- MachinePropertyVariants.cs
- NamedObject.cs
- Substitution.cs
- MarkupWriter.cs
- XmlSchemaSequence.cs
- XmlSchemaSimpleType.cs
- DbTransaction.cs
- SecurityTokenSerializer.cs
- CategoryNameCollection.cs
- FormsAuthenticationConfiguration.cs
- ProjectionPlan.cs
- SettingsPropertyWrongTypeException.cs
- ServiceBusyException.cs
- EmptyCollection.cs
- IndependentAnimationStorage.cs
- NamespaceCollection.cs
- SubclassTypeValidatorAttribute.cs
- DataGridSortCommandEventArgs.cs
- OdbcError.cs
- ItemCollection.cs
- CqlParser.cs
- Activity.cs
- TraceUtils.cs
- SqlStream.cs
- UnSafeCharBuffer.cs
- TextDecoration.cs
- XmlPropertyBag.cs
- MailHeaderInfo.cs
- safelink.cs
- HtmlTernaryTree.cs
- DSGeneratorProblem.cs
- XmlDocumentFieldSchema.cs
- HtmlHead.cs
- HostingEnvironmentException.cs
- AssemblyHash.cs
- DrawingImage.cs
- DataGridItemEventArgs.cs
- AuthenticationException.cs
- ProfilePropertyNameValidator.cs
- NetMsmqBinding.cs