Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / Primitives / DragDeltaEventArgs.cs / 1305600 / 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
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- CodeTypeDelegate.cs
- WebPartDisplayModeEventArgs.cs
- TextEffectResolver.cs
- ZipPackage.cs
- WebPartDescriptionCollection.cs
- RoleGroup.cs
- CreateRefExpr.cs
- InstalledFontCollection.cs
- SqlPersonalizationProvider.cs
- QilBinary.cs
- SequentialUshortCollection.cs
- CharUnicodeInfo.cs
- __ConsoleStream.cs
- BitmapMetadataEnumerator.cs
- OpCodes.cs
- SystemUnicastIPAddressInformation.cs
- SecondaryViewProvider.cs
- ToolStripOverflowButton.cs
- EventWaitHandleSecurity.cs
- CompareValidator.cs
- GridViewSortEventArgs.cs
- CompilerGeneratedAttribute.cs
- FixedPageAutomationPeer.cs
- PermissionAttributes.cs
- _NegoState.cs
- CustomCategoryAttribute.cs
- DbException.cs
- SlotInfo.cs
- InstanceNotReadyException.cs
- Pts.cs
- ComAdminWrapper.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- DesignerLinkAdapter.cs
- securestring.cs
- DurableMessageDispatchInspector.cs
- SecUtil.cs
- MulticastNotSupportedException.cs
- InitializerFacet.cs
- ServicesExceptionNotHandledEventArgs.cs
- CodeAttachEventStatement.cs
- DockProviderWrapper.cs
- PictureBox.cs
- XmlTextAttribute.cs
- StateMachineSubscriptionManager.cs
- DataBinding.cs
- TreeViewEvent.cs
- TypedColumnHandler.cs
- XamlSerializationHelper.cs
- SchemaMerger.cs
- CustomGrammar.cs
- ModifierKeysConverter.cs
- OdbcParameterCollection.cs
- XmlDataSourceView.cs
- X509CertificateTrustedIssuerElementCollection.cs
- InfoCardKeyedHashAlgorithm.cs
- BoundField.cs
- StructuredProperty.cs
- WebPageTraceListener.cs
- LogLogRecord.cs
- Journal.cs
- TableDetailsCollection.cs
- TreeNodeBindingCollection.cs
- Drawing.cs
- JsonFormatMapping.cs
- EventToken.cs
- UpDownEvent.cs
- SizeF.cs
- BrowserDefinitionCollection.cs
- RolePrincipal.cs
- FlowDocumentPage.cs
- XmlAttributeAttribute.cs
- DataGridViewRowCancelEventArgs.cs
- StaticExtensionConverter.cs
- InternalDispatchObject.cs
- CharStorage.cs
- EndpointPerformanceCounters.cs
- DataGridViewLinkColumn.cs
- Event.cs
- Compilation.cs
- TreeNodeStyle.cs
- ChameleonKey.cs
- ButtonBase.cs
- IndentedWriter.cs
- StatementContext.cs
- OutputCacheSettingsSection.cs
- SchemaTypeEmitter.cs
- ConfigXmlAttribute.cs
- WrappedIUnknown.cs
- ChannelDispatcher.cs
- FormViewDeletedEventArgs.cs
- Thread.cs
- ExpressionNode.cs
- UnsafeNativeMethods.cs
- ItemChangedEventArgs.cs
- SQLRoleProvider.cs
- FontStyleConverter.cs
- UnhandledExceptionEventArgs.cs
- IsolatedStorageException.cs
- SmtpException.cs