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
- DynamicDiscoSearcher.cs
- BevelBitmapEffect.cs
- TransformCryptoHandle.cs
- WSHttpBindingElement.cs
- DragAssistanceManager.cs
- BufferedWebEventProvider.cs
- EventLogException.cs
- XmlSequenceWriter.cs
- HttpRawResponse.cs
- WebPart.cs
- SqlOuterApplyReducer.cs
- ChineseLunisolarCalendar.cs
- Identifier.cs
- DynamicArgumentDialog.cs
- FreeFormDesigner.cs
- RayHitTestParameters.cs
- ObjectNotFoundException.cs
- COAUTHINFO.cs
- DynamicRendererThreadManager.cs
- SimpleExpression.cs
- Token.cs
- ListViewGroupCollectionEditor.cs
- CheckBoxBaseAdapter.cs
- HtmlControlDesigner.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- HttpSessionStateBase.cs
- VisualStyleElement.cs
- DataGridCellAutomationPeer.cs
- ParallelActivityDesigner.cs
- BufferManager.cs
- AsyncDataRequest.cs
- TouchEventArgs.cs
- RegexRunner.cs
- NavigationService.cs
- AsyncPostBackTrigger.cs
- MobileControl.cs
- TextWriterTraceListener.cs
- BCLDebug.cs
- ColumnMap.cs
- ReadWriteSpinLock.cs
- SecuritySessionFilter.cs
- ControlDesignerState.cs
- CollectionViewProxy.cs
- ProgressBarAutomationPeer.cs
- MessageLoggingFilterTraceRecord.cs
- MatrixAnimationBase.cs
- StateMachineWorkflowDesigner.cs
- HtmlInputFile.cs
- XdrBuilder.cs
- DataBoundControlHelper.cs
- PenThread.cs
- ClientRolePrincipal.cs
- StatusBar.cs
- SmtpCommands.cs
- Exceptions.cs
- GPPOINT.cs
- HeaderPanel.cs
- CallSiteOps.cs
- XmlSchemaComplexContentRestriction.cs
- TypeRestriction.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- CompoundFileIOPermission.cs
- WindowsSpinner.cs
- XmlNamedNodeMap.cs
- WebColorConverter.cs
- Point.cs
- WmfPlaceableFileHeader.cs
- PackageRelationship.cs
- Encoder.cs
- SHA384.cs
- oledbmetadatacollectionnames.cs
- DBConcurrencyException.cs
- ObjectSpanRewriter.cs
- FaultConverter.cs
- ProtectedProviderSettings.cs
- PieceNameHelper.cs
- DirectoryNotFoundException.cs
- metadatamappinghashervisitor.cs
- VariantWrapper.cs
- MatrixKeyFrameCollection.cs
- objectresult_tresulttype.cs
- Parser.cs
- ExpressionWriter.cs
- Helper.cs
- Geometry.cs
- DataGridViewCellStyleChangedEventArgs.cs
- ObjectSet.cs
- PhonemeEventArgs.cs
- SamlDelegatingWriter.cs
- DetailsViewRow.cs
- JournalNavigationScope.cs
- ErrorRuntimeConfig.cs
- ContextStack.cs
- SiteMapPathDesigner.cs
- ArrangedElementCollection.cs
- XmlSerializationReader.cs
- XmlValidatingReaderImpl.cs
- VisualBasicSettingsConverter.cs
- ChannelServices.cs
- Operator.cs