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
- MetadataException.cs
- Authorization.cs
- NavigationEventArgs.cs
- ADConnectionHelper.cs
- XmlSchemaSimpleContent.cs
- OneOfTypeConst.cs
- ProcessModule.cs
- UrlAuthorizationModule.cs
- FixedSOMLineCollection.cs
- ActivationServices.cs
- RangeBase.cs
- CompressionTransform.cs
- SqlNotificationEventArgs.cs
- PerfCounterSection.cs
- GeneralTransform2DTo3DTo2D.cs
- TrustManagerPromptUI.cs
- SiteOfOriginContainer.cs
- RuleAttributes.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- SettingsSection.cs
- MultiPageTextView.cs
- Control.cs
- SoapMessage.cs
- HttpProtocolImporter.cs
- relpropertyhelper.cs
- CodeNamespaceImport.cs
- TextEditorThreadLocalStore.cs
- ManagedIStream.cs
- DataTableClearEvent.cs
- LogLogRecordHeader.cs
- MatrixIndependentAnimationStorage.cs
- DatatypeImplementation.cs
- InProcStateClientManager.cs
- NamespaceCollection.cs
- PairComparer.cs
- DataControlFieldCell.cs
- DockingAttribute.cs
- CodeValidator.cs
- ApplicationFileCodeDomTreeGenerator.cs
- NamedElement.cs
- QueryFunctions.cs
- Positioning.cs
- _ProxyChain.cs
- SrgsElementFactoryCompiler.cs
- BaseDataListDesigner.cs
- GeneralTransform3DCollection.cs
- QilExpression.cs
- AbandonedMutexException.cs
- RSAOAEPKeyExchangeDeformatter.cs
- _ConnectionGroup.cs
- XpsPackagingException.cs
- Color.cs
- SoapServerMethod.cs
- MemoryMappedFileSecurity.cs
- XPathChildIterator.cs
- LowerCaseStringConverter.cs
- Cursor.cs
- ExpressionDumper.cs
- DataRowComparer.cs
- DataTable.cs
- ServiceChannelProxy.cs
- SizeAnimationClockResource.cs
- WebColorConverter.cs
- InternalDispatchObject.cs
- RequestCacheValidator.cs
- TextParagraphProperties.cs
- GrabHandleGlyph.cs
- ContentElementAutomationPeer.cs
- PropertyMappingExceptionEventArgs.cs
- SchemaElementLookUpTable.cs
- GraphicsContainer.cs
- PointLightBase.cs
- InkCanvas.cs
- ModifierKeysConverter.cs
- DbParameterHelper.cs
- FilterQuery.cs
- ContextProperty.cs
- TextEditorSpelling.cs
- SqlSelectStatement.cs
- TableHeaderCell.cs
- BooleanStorage.cs
- InstanceDataCollection.cs
- DrawListViewColumnHeaderEventArgs.cs
- Page.cs
- EnumerableRowCollection.cs
- MimeFormatExtensions.cs
- FontSizeConverter.cs
- SafeReversePInvokeHandle.cs
- NotFiniteNumberException.cs
- NamespaceEmitter.cs
- TextFormatterHost.cs
- SplitterPanel.cs
- HttpApplication.cs
- DataListCommandEventArgs.cs
- ImageBrush.cs
- UIElementParaClient.cs
- MenuItem.cs
- OdbcConnection.cs
- TracePayload.cs
- EastAsianLunisolarCalendar.cs