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
- SqlConnectionFactory.cs
- AsymmetricSignatureFormatter.cs
- ChooseAction.cs
- SelectedDatesCollection.cs
- IconBitmapDecoder.cs
- _HTTPDateParse.cs
- ResourceAssociationType.cs
- AudioFormatConverter.cs
- ComponentChangingEvent.cs
- PenThread.cs
- ActivityScheduledQuery.cs
- PassportPrincipal.cs
- __ConsoleStream.cs
- DependencyPropertyValueSerializer.cs
- ConstructorBuilder.cs
- ExpandCollapsePattern.cs
- InternalTransaction.cs
- AdPostCacheSubstitution.cs
- LineUtil.cs
- Transform.cs
- Expression.cs
- securitycriticaldataClass.cs
- XmlIlVisitor.cs
- NumericUpDown.cs
- Underline.cs
- XmlSchemaType.cs
- FixedSchema.cs
- DataSetMappper.cs
- FreezableDefaultValueFactory.cs
- KoreanLunisolarCalendar.cs
- EnvironmentPermission.cs
- BasePropertyDescriptor.cs
- KeysConverter.cs
- configsystem.cs
- HttpDictionary.cs
- StructuralObject.cs
- MetricEntry.cs
- DataSourceControl.cs
- WindowsStatusBar.cs
- OleAutBinder.cs
- RoleGroupCollection.cs
- PerformanceCounters.cs
- StylusPointPropertyInfoDefaults.cs
- IdentifierCollection.cs
- FontEditor.cs
- CustomAttribute.cs
- EmbeddedMailObjectsCollection.cs
- FileDialog_Vista.cs
- ControlValuePropertyAttribute.cs
- OdbcParameter.cs
- DataGridViewComboBoxColumnDesigner.cs
- RequestCacheValidator.cs
- ObjectListDesigner.cs
- HMACSHA1.cs
- InternalConfigEventArgs.cs
- AdapterUtil.cs
- GraphicsPath.cs
- SHA512.cs
- Parameter.cs
- RoutedCommand.cs
- PropertyFilterAttribute.cs
- BindableTemplateBuilder.cs
- KeyedPriorityQueue.cs
- PeerUnsafeNativeMethods.cs
- TrustManagerPromptUI.cs
- SizeValueSerializer.cs
- ImageSourceValueSerializer.cs
- XPathNodeInfoAtom.cs
- StrokeNodeOperations2.cs
- RegistryPermission.cs
- ConnectionProviderAttribute.cs
- MouseGestureConverter.cs
- RoutedEvent.cs
- LinkButton.cs
- XmlSerializerObjectSerializer.cs
- XmlExceptionHelper.cs
- NamespaceTable.cs
- ReliabilityContractAttribute.cs
- DebuggerAttributes.cs
- FileDetails.cs
- TriggerBase.cs
- EventPropertyMap.cs
- IUnknownConstantAttribute.cs
- RelatedImageListAttribute.cs
- SqlCaseSimplifier.cs
- WindowsFormsHostAutomationPeer.cs
- FlagsAttribute.cs
- TextTabProperties.cs
- XmlSiteMapProvider.cs
- RegexWorker.cs
- SendSecurityHeader.cs
- DSACryptoServiceProvider.cs
- HyperLinkField.cs
- Slider.cs
- PromptStyle.cs
- PagedDataSource.cs
- FormClosingEvent.cs
- MenuEventArgs.cs
- Listbox.cs
- AddInDeploymentState.cs