Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Framework / System / Windows / Controls / Primitives / DragDeltaEventArgs.cs / 1 / DragDeltaEventArgs.cs
using System; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows; namespace System.Windows.Controls.Primitives { ////// This DragDeltaEventArgs class contains additional information about the /// DragDeltaEvent event. /// ////// public class DragDeltaEventArgs: RoutedEventArgs { /// /// This is an instance constructor for the DragDeltaEventArgs class. It /// is constructed with a reference to the event being raised. /// ///Nothing. public DragDeltaEventArgs(double horizontalChange, double verticalChange) : base() { _horizontalChange = horizontalChange; _verticalChange = verticalChange; RoutedEvent=Thumb.DragDeltaEvent; } ////// Read-only access to the horizontal change. /// public double HorizontalChange { get { return _horizontalChange; } } ////// Read-only access to the vertical change. /// public double VerticalChange { get { return _verticalChange; } } ////// This method is used to perform the proper type casting in order to /// call the type-safe DragDeltaEventHandler delegate for the DragDeltaEvent event. /// /// The handler to invoke. /// The current object along the event's route. ///Nothing. ////// protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget) { DragDeltaEventHandler handler = (DragDeltaEventHandler)genericHandler; handler(genericTarget, this); } private double _horizontalChange; private double _verticalChange; } /// /// This delegate must used by handlers of the DragDeltaEvent event. /// /// The current element along the event's route. /// The event arguments containing additional information about the event. ///Nothing. public delegate void DragDeltaEventHandler(object sender, DragDeltaEventArgs 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 DragDeltaEventArgs class contains additional information about the /// DragDeltaEvent event. /// ////// public class DragDeltaEventArgs: RoutedEventArgs { /// /// This is an instance constructor for the DragDeltaEventArgs class. It /// is constructed with a reference to the event being raised. /// ///Nothing. public DragDeltaEventArgs(double horizontalChange, double verticalChange) : base() { _horizontalChange = horizontalChange; _verticalChange = verticalChange; RoutedEvent=Thumb.DragDeltaEvent; } ////// Read-only access to the horizontal change. /// public double HorizontalChange { get { return _horizontalChange; } } ////// Read-only access to the vertical change. /// public double VerticalChange { get { return _verticalChange; } } ////// This method is used to perform the proper type casting in order to /// call the type-safe DragDeltaEventHandler delegate for the DragDeltaEvent event. /// /// The handler to invoke. /// The current object along the event's route. ///Nothing. ////// protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget) { DragDeltaEventHandler handler = (DragDeltaEventHandler)genericHandler; handler(genericTarget, this); } private double _horizontalChange; private double _verticalChange; } /// /// This delegate must used by handlers of the DragDeltaEvent event. /// /// The current element along the event's route. /// The event arguments containing additional information about the event. ///Nothing. public delegate void DragDeltaEventHandler(object sender, DragDeltaEventArgs 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
- QueryPageSettingsEventArgs.cs
- MatrixAnimationUsingPath.cs
- UnsafeNativeMethods.cs
- CommandEventArgs.cs
- TrustDriver.cs
- HtmlShim.cs
- ContentPosition.cs
- DataProtection.cs
- StringInfo.cs
- XmlSchemaSimpleTypeList.cs
- StringTraceRecord.cs
- CombinedGeometry.cs
- RadioButtonStandardAdapter.cs
- WebControlsSection.cs
- ProfileInfo.cs
- DelegatedStream.cs
- ProxyHwnd.cs
- EventSetter.cs
- StrokeNodeEnumerator.cs
- ToolStripDropDownClosedEventArgs.cs
- SoapIgnoreAttribute.cs
- OptimalTextSource.cs
- NamedElement.cs
- AssemblyCollection.cs
- UIElementPropertyUndoUnit.cs
- DoubleAnimationBase.cs
- EntityDesignerBuildProvider.cs
- Command.cs
- Rotation3D.cs
- ComponentEditorForm.cs
- ZipIOLocalFileHeader.cs
- HwndSubclass.cs
- KeyEvent.cs
- WebPartDisplayModeCancelEventArgs.cs
- NonBatchDirectoryCompiler.cs
- DocumentViewerConstants.cs
- HitTestWithGeometryDrawingContextWalker.cs
- HwndSourceParameters.cs
- XmlCharType.cs
- RuntimeArgumentHandle.cs
- mediaeventshelper.cs
- PropertyGeneratedEventArgs.cs
- NameValueConfigurationElement.cs
- AssemblyHelper.cs
- Dump.cs
- CompositeControl.cs
- InheritanceContextChangedEventManager.cs
- StreamWriter.cs
- Label.cs
- X509CertificateValidator.cs
- WebPartAddingEventArgs.cs
- UrlMappingsSection.cs
- BindToObject.cs
- Base64Decoder.cs
- WindowsFormsSectionHandler.cs
- X509PeerCertificateAuthentication.cs
- DBSqlParserColumnCollection.cs
- UnsafeNativeMethods.cs
- AsyncOperationManager.cs
- XmlEncoding.cs
- ParsedAttributeCollection.cs
- OracleFactory.cs
- TableCellsCollectionEditor.cs
- DataExpression.cs
- LocalizationParserHooks.cs
- GeneralTransform.cs
- WindowsRichEditRange.cs
- datacache.cs
- EventLogPermission.cs
- TimersDescriptionAttribute.cs
- WebZoneDesigner.cs
- VariantWrapper.cs
- ObjectQueryExecutionPlan.cs
- ActivityValidator.cs
- VoiceObjectToken.cs
- HttpNamespaceReservationInstallComponent.cs
- UDPClient.cs
- TcpPortSharing.cs
- RequestDescription.cs
- SecurityCriticalDataForSet.cs
- ServiceBuildProvider.cs
- TdsParserSessionPool.cs
- CollectionConverter.cs
- NeutralResourcesLanguageAttribute.cs
- Classification.cs
- UIElement3D.cs
- CommentEmitter.cs
- Parameter.cs
- CheckPair.cs
- TypedRowGenerator.cs
- FontClient.cs
- CodeNamespaceImport.cs
- AnnotationStore.cs
- CmsInterop.cs
- MappedMetaModel.cs
- DispatcherProcessingDisabled.cs
- PTUtility.cs
- Storyboard.cs
- StringBuilder.cs
- IntSecurity.cs