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
- Shape.cs
- CaseInsensitiveComparer.cs
- DataGridViewColumn.cs
- CalendarDataBindingHandler.cs
- AssemblyAssociatedContentFileAttribute.cs
- DataSetMappper.cs
- ExtendedProperty.cs
- Durable.cs
- TabRenderer.cs
- XmlSchemaCollection.cs
- MetricEntry.cs
- TimeoutException.cs
- ThumbAutomationPeer.cs
- TypeToken.cs
- RectAnimationBase.cs
- DataSysAttribute.cs
- SqlCommand.cs
- BooleanAnimationBase.cs
- PcmConverter.cs
- StringValueSerializer.cs
- SafeProcessHandle.cs
- StringKeyFrameCollection.cs
- PropertyValueUIItem.cs
- SQLGuid.cs
- DesignerActionItem.cs
- AuthenticatedStream.cs
- AmbientValueAttribute.cs
- IntranetCredentialPolicy.cs
- BrushValueSerializer.cs
- OLEDB_Enum.cs
- ObjectSet.cs
- CodePropertyReferenceExpression.cs
- XmlElementAttributes.cs
- Binding.cs
- PassportIdentity.cs
- SymbolPair.cs
- GridViewRowEventArgs.cs
- CompositeFontInfo.cs
- UsernameTokenFactoryCredential.cs
- ToolStripMenuItem.cs
- PageCache.cs
- DbConnectionPoolGroup.cs
- Menu.cs
- WebFormDesignerActionService.cs
- RsaEndpointIdentity.cs
- MethodCallConverter.cs
- DataGridViewCellStyle.cs
- DataRowView.cs
- InstanceOwner.cs
- DataMemberAttribute.cs
- SettingsPropertyNotFoundException.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- Polyline.cs
- PropertyIdentifier.cs
- CornerRadius.cs
- FontFaceLayoutInfo.cs
- HttpFileCollection.cs
- OpenTypeLayout.cs
- TypedReference.cs
- XamlInt32CollectionSerializer.cs
- DispatchProxy.cs
- MatrixUtil.cs
- ToolTip.cs
- StoryFragments.cs
- ComplexType.cs
- ExpressionBuilder.cs
- RoutedEvent.cs
- InternalCache.cs
- ManagementEventArgs.cs
- FlowNode.cs
- SecurityUtils.cs
- DataServiceRequest.cs
- EntryIndex.cs
- CapabilitiesPattern.cs
- RoleGroup.cs
- DataGridViewTextBoxColumn.cs
- UriSectionData.cs
- ExceptionUtil.cs
- CmsInterop.cs
- HtmlShimManager.cs
- SqlBinder.cs
- FrameworkElementAutomationPeer.cs
- AppDomainCompilerProxy.cs
- WebContext.cs
- NumberFunctions.cs
- MimeTextImporter.cs
- CategoryAttribute.cs
- ExcCanonicalXml.cs
- DataGridColumnCollection.cs
- TextEditor.cs
- Point3DCollection.cs
- SamlSecurityTokenAuthenticator.cs
- HttpHandlersSection.cs
- AuthenticationConfig.cs
- IPGlobalProperties.cs
- SpeechRecognitionEngine.cs
- DynamicControl.cs
- BrushValueSerializer.cs
- MinimizableAttributeTypeConverter.cs
- ManagedWndProcTracker.cs