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
- ImageIndexConverter.cs
- MatrixCamera.cs
- wgx_exports.cs
- ConfigurationLocation.cs
- HtmlGenericControl.cs
- EditingMode.cs
- InvalidDataException.cs
- StrongNameIdentityPermission.cs
- DetailsViewRowCollection.cs
- ContextProperty.cs
- ToolTip.cs
- CallbackWrapper.cs
- TreeNodeSelectionProcessor.cs
- InternalTransaction.cs
- Facet.cs
- FontNamesConverter.cs
- HttpPostedFile.cs
- PropertyGeneratedEventArgs.cs
- TimestampInformation.cs
- EdgeProfileValidation.cs
- SaveWorkflowAsyncResult.cs
- ContentPropertyAttribute.cs
- GridEntry.cs
- PeerToPeerException.cs
- CustomValidator.cs
- ZoneButton.cs
- MetadataSource.cs
- XPathDocumentNavigator.cs
- DispatcherProcessingDisabled.cs
- ContextStaticAttribute.cs
- Operand.cs
- IxmlLineInfo.cs
- RegexMatch.cs
- RealProxy.cs
- DocumentViewerBaseAutomationPeer.cs
- SchemaEntity.cs
- StreamUpgradeProvider.cs
- FormsAuthenticationConfiguration.cs
- RotateTransform.cs
- GetPageNumberCompletedEventArgs.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- TextStore.cs
- TableParaClient.cs
- FontWeights.cs
- EventWaitHandle.cs
- MaskedTextBoxTextEditorDropDown.cs
- StructureChangedEventArgs.cs
- LiteralControl.cs
- ExecutedRoutedEventArgs.cs
- Control.cs
- XmlDocumentFieldSchema.cs
- VarInfo.cs
- MediaContextNotificationWindow.cs
- Panel.cs
- ColorInterpolationModeValidation.cs
- TransformedBitmap.cs
- DoubleAnimationClockResource.cs
- MruCache.cs
- AssociationTypeEmitter.cs
- UserThread.cs
- Animatable.cs
- CallbackHandler.cs
- HttpModule.cs
- CheckBox.cs
- PrtCap_Base.cs
- DataGridRelationshipRow.cs
- MembershipUser.cs
- ObjectComplexPropertyMapping.cs
- ClientProxyGenerator.cs
- SerializationInfoEnumerator.cs
- EFAssociationProvider.cs
- TemplatePropertyEntry.cs
- OperationResponse.cs
- Helper.cs
- MenuItem.cs
- ControlType.cs
- MarkupObject.cs
- FSWPathEditor.cs
- Property.cs
- ItemMap.cs
- XmlSchemaExporter.cs
- Int32RectConverter.cs
- ObjectItemCachedAssemblyLoader.cs
- LineInfo.cs
- HtmlForm.cs
- NativeRightsManagementAPIsStructures.cs
- DataGridRow.cs
- NumberAction.cs
- MimeWriter.cs
- _Events.cs
- ScriptControlManager.cs
- DocumentSchemaValidator.cs
- CornerRadiusConverter.cs
- ContextMenuStripGroup.cs
- HttpValueCollection.cs
- Blend.cs
- WebBrowserNavigatingEventHandler.cs
- SynchronizedDispatch.cs
- EventLogger.cs
- VersionedStream.cs