Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- HashCodeCombiner.cs
- VerbConverter.cs
- Transactions.cs
- CodeConstructor.cs
- BaseAddressElementCollection.cs
- TypeValidationEventArgs.cs
- KeysConverter.cs
- NonBatchDirectoryCompiler.cs
- XmlObjectSerializerContext.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- PointLight.cs
- HttpMethodAttribute.cs
- ObjectDataSourceFilteringEventArgs.cs
- DataControlHelper.cs
- SourceFileInfo.cs
- SessionIDManager.cs
- CustomCredentialPolicy.cs
- CommonDialog.cs
- UIElement3D.cs
- ListView.cs
- BackgroundFormatInfo.cs
- WebSysDisplayNameAttribute.cs
- PeerPresenceInfo.cs
- HScrollProperties.cs
- ExtendedPropertyDescriptor.cs
- BindUriHelper.cs
- SizeConverter.cs
- XmlSchemaSubstitutionGroup.cs
- AmbientLight.cs
- JapaneseLunisolarCalendar.cs
- ColorConvertedBitmap.cs
- _ListenerAsyncResult.cs
- SectionRecord.cs
- NavigateUrlConverter.cs
- DefaultDiscoveryServiceExtension.cs
- InvalidPropValue.cs
- SourceSwitch.cs
- CheckBoxPopupAdapter.cs
- httpapplicationstate.cs
- SqlMethodAttribute.cs
- AnnotationMap.cs
- BuildResultCache.cs
- MsmqIntegrationProcessProtocolHandler.cs
- SpecialNameAttribute.cs
- ZoneLinkButton.cs
- Timer.cs
- XamlToRtfParser.cs
- DataContractFormatAttribute.cs
- DesignerForm.cs
- DataConnectionHelper.cs
- JumpList.cs
- AssemblyCollection.cs
- DefaultMemberAttribute.cs
- ConfigsHelper.cs
- GenericXmlSecurityToken.cs
- FixedSOMTable.cs
- TraceContextRecord.cs
- TextServicesLoader.cs
- TreeNode.cs
- RepeatBehavior.cs
- TCEAdapterGenerator.cs
- SafeCryptoHandles.cs
- DataFieldConverter.cs
- List.cs
- JsonSerializer.cs
- AuthenticationService.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- ValueConversionAttribute.cs
- MobileControlPersister.cs
- Type.cs
- ConfigXmlAttribute.cs
- RemoteWebConfigurationHostStream.cs
- DirtyTextRange.cs
- PageWrapper.cs
- ResourcePool.cs
- GenericXmlSecurityToken.cs
- _SpnDictionary.cs
- FontConverter.cs
- ListViewItemMouseHoverEvent.cs
- __Filters.cs
- IWorkflowDebuggerService.cs
- ActivityValidator.cs
- ConnectionInterfaceCollection.cs
- InputScopeAttribute.cs
- SizeLimitedCache.cs
- FileAuthorizationModule.cs
- SqlInfoMessageEvent.cs
- ValidationSummary.cs
- ReadOnlyDictionary.cs
- ConsumerConnectionPointCollection.cs
- PropertyTab.cs
- recordstatescratchpad.cs
- FileDialogCustomPlace.cs
- RequestResizeEvent.cs
- Parallel.cs
- ExtenderControl.cs
- ParserContext.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- StyleReferenceConverter.cs
- BevelBitmapEffect.cs