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
- SmtpFailedRecipientsException.cs
- ContextMenu.cs
- WebPartConnectVerb.cs
- Nodes.cs
- XmlConvert.cs
- OdbcPermission.cs
- XmlDataSource.cs
- SqlPersistenceWorkflowInstanceDescription.cs
- XPathSelectionIterator.cs
- LazyTextWriterCreator.cs
- CategoryEditor.cs
- DiscoveryMessageSequenceGenerator.cs
- DefaultPrintController.cs
- RoutedEventHandlerInfo.cs
- DatatypeImplementation.cs
- SwitchElementsCollection.cs
- SmiRecordBuffer.cs
- FontWeight.cs
- TemplateParser.cs
- HtmlSelectionListAdapter.cs
- DependencyPropertyHelper.cs
- DirectoryNotFoundException.cs
- ExpressionBindings.cs
- AsyncOperationContext.cs
- TemplateApplicationHelper.cs
- figurelengthconverter.cs
- RightsManagementErrorHandler.cs
- MethodCallTranslator.cs
- PrintEvent.cs
- SrgsElementList.cs
- SqlProfileProvider.cs
- EtwTrackingParticipant.cs
- PeerToPeerException.cs
- FormViewUpdatedEventArgs.cs
- Vector3DAnimationBase.cs
- SecurityMessageProperty.cs
- ImageSource.cs
- GuidelineSet.cs
- WmlControlAdapter.cs
- StreamWithDictionary.cs
- CustomErrorsSectionWrapper.cs
- ClosableStream.cs
- sqlmetadatafactory.cs
- GZipDecoder.cs
- DbExpressionVisitor_TResultType.cs
- WebReferencesBuildProvider.cs
- SettingsPropertyValueCollection.cs
- SystemColorTracker.cs
- TypeUtil.cs
- RequestedSignatureDialog.cs
- HyperLinkColumn.cs
- HotSpotCollection.cs
- HttpModulesSection.cs
- Barrier.cs
- TextProperties.cs
- AttributeTable.cs
- _LazyAsyncResult.cs
- AccessDataSourceView.cs
- DbMetaDataFactory.cs
- CodeAccessSecurityEngine.cs
- TargetConverter.cs
- MediaContextNotificationWindow.cs
- XmlQueryOutput.cs
- ModelVisual3D.cs
- StandardToolWindows.cs
- RequestSecurityToken.cs
- UnhandledExceptionEventArgs.cs
- ToolboxItemFilterAttribute.cs
- WindowsComboBox.cs
- SqlAliasesReferenced.cs
- ImageEditor.cs
- TransactionFilter.cs
- IDispatchConstantAttribute.cs
- KeySplineConverter.cs
- RequestCacheManager.cs
- XDRSchema.cs
- ToolStripDropDownButton.cs
- UrlPath.cs
- XmlFormatExtensionPrefixAttribute.cs
- DataGridCellsPanel.cs
- MetafileHeader.cs
- ToolStripMenuItem.cs
- UrlParameterReader.cs
- DES.cs
- TextWriterEngine.cs
- RemoteWebConfigurationHostServer.cs
- SystemException.cs
- SystemException.cs
- HybridDictionary.cs
- NameSpaceEvent.cs
- CacheChildrenQuery.cs
- XmlSerializer.cs
- RoleService.cs
- ResourceManagerWrapper.cs
- ValueUnavailableException.cs
- DateTimeUtil.cs
- XmlSerializationWriter.cs
- SecurityUtils.cs
- CompilationRelaxations.cs
- Sorting.cs