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
- StrokeSerializer.cs
- HtmlInputText.cs
- DoubleAnimationUsingPath.cs
- WorkflowItemPresenter.cs
- RequestBringIntoViewEventArgs.cs
- OperationResponse.cs
- BuildDependencySet.cs
- IdentityModelStringsVersion1.cs
- EventMap.cs
- BitmapEffectGroup.cs
- TabOrder.cs
- XmlCharType.cs
- VectorCollectionValueSerializer.cs
- Stream.cs
- AnnotationMap.cs
- smtpconnection.cs
- ProjectionCamera.cs
- PenCursorManager.cs
- OleDbEnumerator.cs
- NetTcpSectionData.cs
- DocumentEventArgs.cs
- SByteConverter.cs
- SafeArrayRankMismatchException.cs
- XmlDataDocument.cs
- DBConnectionString.cs
- TerminateWorkflow.cs
- TimeSpanConverter.cs
- SequentialOutput.cs
- BamlBinaryWriter.cs
- StaticDataManager.cs
- MarkupCompiler.cs
- HMAC.cs
- CodeTypeDeclaration.cs
- EventTask.cs
- MessageHeaderAttribute.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- DodSequenceMerge.cs
- dataprotectionpermissionattribute.cs
- ISO2022Encoding.cs
- Compiler.cs
- ClientTarget.cs
- httpapplicationstate.cs
- DesignTimeData.cs
- AccessedThroughPropertyAttribute.cs
- TableLayoutStyleCollection.cs
- AppSettingsSection.cs
- Options.cs
- Oid.cs
- ControlCachePolicy.cs
- BinaryMethodMessage.cs
- SqlGatherConsumedAliases.cs
- DesigntimeLicenseContextSerializer.cs
- WrappedKeySecurityTokenParameters.cs
- ModuleBuilderData.cs
- IndependentlyAnimatedPropertyMetadata.cs
- ThreadPool.cs
- ParamArrayAttribute.cs
- SelectedDatesCollection.cs
- AliasedSlot.cs
- XmlCompatibilityReader.cs
- ConfigXmlComment.cs
- WebScriptMetadataMessage.cs
- ToolStripSplitButton.cs
- CacheOutputQuery.cs
- BackStopAuthenticationModule.cs
- TextUtf8RawTextWriter.cs
- AppDomainUnloadedException.cs
- RegistrySecurity.cs
- DiscoveryClientOutputChannel.cs
- GetPageCompletedEventArgs.cs
- WorkflowWebService.cs
- DecimalAnimationBase.cs
- DecimalConstantAttribute.cs
- Converter.cs
- CertificateManager.cs
- CreateBookmarkScope.cs
- BackStopAuthenticationModule.cs
- ContentTypeSettingClientMessageFormatter.cs
- ClientTarget.cs
- ReadOnlyHierarchicalDataSourceView.cs
- MediaPlayerState.cs
- serverconfig.cs
- BaseValidator.cs
- BatchStream.cs
- ClientSettingsProvider.cs
- CodeThrowExceptionStatement.cs
- Matrix3DConverter.cs
- DataServiceClientException.cs
- XPathDescendantIterator.cs
- SortQueryOperator.cs
- QilIterator.cs
- TypographyProperties.cs
- ToolStripItemTextRenderEventArgs.cs
- Manipulation.cs
- DefaultAsyncDataDispatcher.cs
- SimpleHandlerBuildProvider.cs
- MsmqBindingMonitor.cs
- PlatformCulture.cs
- SafeIUnknown.cs
- WebPartEditorCancelVerb.cs