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 / 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
- Bezier.cs
- ExceptionUtil.cs
- PersistenceException.cs
- SoapInteropTypes.cs
- Composition.cs
- Material.cs
- DefaultProxySection.cs
- SiteOfOriginPart.cs
- XmlAnyAttributeAttribute.cs
- RelationshipType.cs
- CompilationRelaxations.cs
- SharedPerformanceCounter.cs
- UrlAuthorizationModule.cs
- uribuilder.cs
- CompilationRelaxations.cs
- FileReservationCollection.cs
- ListViewSortEventArgs.cs
- XmlMapping.cs
- XamlFilter.cs
- SemaphoreSecurity.cs
- SynchronizationLockException.cs
- ZoneButton.cs
- OleDbWrapper.cs
- ComponentCommands.cs
- QuaternionKeyFrameCollection.cs
- DataGridViewCellMouseEventArgs.cs
- ExtensionSimplifierMarkupObject.cs
- InternalPolicyElement.cs
- ConfigurationLocation.cs
- SessionState.cs
- InputReportEventArgs.cs
- Mapping.cs
- WebPartsPersonalization.cs
- LateBoundBitmapDecoder.cs
- BatchParser.cs
- ConfigurationCollectionAttribute.cs
- Light.cs
- MetabaseServerConfig.cs
- DigestComparer.cs
- MenuBase.cs
- EntityDescriptor.cs
- OutputScope.cs
- HiddenFieldPageStatePersister.cs
- EnumValidator.cs
- ProxySimple.cs
- ButtonRenderer.cs
- BehaviorDragDropEventArgs.cs
- ObjectIDGenerator.cs
- ApplicationServicesHostFactory.cs
- ParserExtension.cs
- ToolstripProfessionalRenderer.cs
- ListenerAdapterBase.cs
- RtfFormatStack.cs
- ComponentManagerBroker.cs
- PathStreamGeometryContext.cs
- DataGridViewAdvancedBorderStyle.cs
- XmlArrayAttribute.cs
- GetWinFXPath.cs
- SqlNodeTypeOperators.cs
- DoubleCollectionConverter.cs
- messageonlyhwndwrapper.cs
- OleDbConnection.cs
- EntityTypeEmitter.cs
- OutputCacheSection.cs
- TextSegment.cs
- _SSPIWrapper.cs
- XmlSerializerSection.cs
- QueryParameter.cs
- TextBox.cs
- BuildProviderCollection.cs
- BasicExpressionVisitor.cs
- ChangeBlockUndoRecord.cs
- SystemFonts.cs
- Size3D.cs
- SchemaCollectionCompiler.cs
- XMLDiffLoader.cs
- StreamGeometry.cs
- XmlDocumentSurrogate.cs
- ClientTargetSection.cs
- StateFinalizationDesigner.cs
- ConnectionOrientedTransportChannelFactory.cs
- NonVisualControlAttribute.cs
- HierarchicalDataBoundControl.cs
- SettingsAttributes.cs
- PointCollectionConverter.cs
- ObjectDataSource.cs
- PaintEvent.cs
- OdbcConnectionHandle.cs
- EdmComplexTypeAttribute.cs
- ListViewItemEventArgs.cs
- GenerateTemporaryTargetAssembly.cs
- SharedHttpsTransportManager.cs
- ClassDataContract.cs
- InitializationEventAttribute.cs
- XmlDocumentType.cs
- HttpPostedFileWrapper.cs
- Imaging.cs
- ErrorStyle.cs
- DoubleLinkList.cs
- FlagsAttribute.cs