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
- DynamicPropertyHolder.cs
- CodeDOMUtility.cs
- CharacterBufferReference.cs
- ModelMemberCollection.cs
- FlowLayoutPanelDesigner.cs
- FixedSOMTableRow.cs
- HostedNamedPipeTransportManager.cs
- StylusPlugin.cs
- _BufferOffsetSize.cs
- GroupDescription.cs
- LoginName.cs
- SmiSettersStream.cs
- Point3DConverter.cs
- ProfileInfo.cs
- CustomValidator.cs
- DataSourceSelectArguments.cs
- PanelStyle.cs
- ControlParameter.cs
- MatchingStyle.cs
- BoundConstants.cs
- FormViewDeleteEventArgs.cs
- FormatterServices.cs
- PolyBezierSegment.cs
- ProtocolsSection.cs
- DataReceivedEventArgs.cs
- AnnotationDocumentPaginator.cs
- _TimerThread.cs
- ToolStripItemEventArgs.cs
- PerformanceCounterLib.cs
- SqlCommandBuilder.cs
- XmlSortKey.cs
- DataGridRow.cs
- RadioButtonRenderer.cs
- UpdateProgress.cs
- Vector3DConverter.cs
- ReadOnlyObservableCollection.cs
- dbenumerator.cs
- ImageMap.cs
- AppSettingsExpressionBuilder.cs
- ResourcesBuildProvider.cs
- Matrix3D.cs
- TemplateXamlParser.cs
- CuspData.cs
- ReadOnlyCollectionBase.cs
- ContentPlaceHolder.cs
- Size3D.cs
- ToolTip.cs
- WebPartCollection.cs
- SmtpSection.cs
- StrokeNodeOperations2.cs
- Error.cs
- HandoffBehavior.cs
- _CookieModule.cs
- FontFamilyIdentifier.cs
- InfoCardTrace.cs
- JpegBitmapEncoder.cs
- PropertyChangingEventArgs.cs
- LiteralControl.cs
- TemplateControlCodeDomTreeGenerator.cs
- RightsManagementLicense.cs
- Baml2006ReaderFrame.cs
- SqlException.cs
- Comparer.cs
- Scheduler.cs
- MouseOverProperty.cs
- ContextStack.cs
- VersionedStream.cs
- CurrentChangedEventManager.cs
- TaiwanCalendar.cs
- SqlColumnizer.cs
- FrameSecurityDescriptor.cs
- TypeListConverter.cs
- MessageContractAttribute.cs
- SqlSupersetValidator.cs
- HotCommands.cs
- Font.cs
- EntryPointNotFoundException.cs
- _Events.cs
- HttpRequestCacheValidator.cs
- CustomAttributeFormatException.cs
- UnionExpr.cs
- XmlLanguage.cs
- EntityDataSourceContextCreatingEventArgs.cs
- Win32Interop.cs
- RouteItem.cs
- CallSiteBinder.cs
- PageHandlerFactory.cs
- ActivityCodeGenerator.cs
- SyndicationDeserializer.cs
- X509CertificateStore.cs
- _LocalDataStore.cs
- DataGridViewSelectedColumnCollection.cs
- XmlBinaryWriterSession.cs
- ProgressBar.cs
- HiddenFieldDesigner.cs
- PreviewPageInfo.cs
- AspCompat.cs
- XPathExpr.cs
- ScriptRegistrationManager.cs
- TreeViewItemAutomationPeer.cs