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
- SqlRowUpdatingEvent.cs
- Unit.cs
- ObjectAnimationUsingKeyFrames.cs
- UIElement3D.cs
- ScrollBarAutomationPeer.cs
- ChannelBuilder.cs
- lengthconverter.cs
- HtmlForm.cs
- ServicePoint.cs
- XamlStyleSerializer.cs
- Nullable.cs
- TransferRequestHandler.cs
- UnionQueryOperator.cs
- SuppressMergeCheckAttribute.cs
- DataGridViewColumnEventArgs.cs
- SplitterEvent.cs
- TextElement.cs
- FileLogRecord.cs
- RuntimeConfigurationRecord.cs
- DescendentsWalker.cs
- ProvidersHelper.cs
- HitTestDrawingContextWalker.cs
- ConfigurationManagerHelperFactory.cs
- UntrustedRecipientException.cs
- AddInContractAttribute.cs
- DesignerAdapterUtil.cs
- Rect.cs
- COM2TypeInfoProcessor.cs
- LayoutTable.cs
- CircleHotSpot.cs
- DetailsViewCommandEventArgs.cs
- _AutoWebProxyScriptHelper.cs
- ImageMapEventArgs.cs
- ParentQuery.cs
- Int32RectConverter.cs
- ComponentResourceManager.cs
- DataTablePropertyDescriptor.cs
- ServiceModelConfigurationSectionGroup.cs
- BaseParser.cs
- DbConnectionStringCommon.cs
- CodePropertyReferenceExpression.cs
- SynchronizationContext.cs
- GenericXmlSecurityTokenAuthenticator.cs
- SecurityPolicySection.cs
- HtmlElement.cs
- Misc.cs
- Metadata.cs
- GridView.cs
- HwndSourceParameters.cs
- Clipboard.cs
- DefaultSection.cs
- MetadataException.cs
- CompilerTypeWithParams.cs
- HttpContextServiceHost.cs
- ZipIOFileItemStream.cs
- PreviousTrackingServiceAttribute.cs
- ConfigurationManagerInternalFactory.cs
- ValueSerializer.cs
- WebExceptionStatus.cs
- TemplatePartAttribute.cs
- CounterCreationDataCollection.cs
- RtfToXamlReader.cs
- TreeNodeSelectionProcessor.cs
- DomainUpDown.cs
- LogLogRecord.cs
- UnhandledExceptionEventArgs.cs
- Int16Storage.cs
- ProvidePropertyAttribute.cs
- FormViewPageEventArgs.cs
- SimpleTypesSurrogate.cs
- ExtensionDataReader.cs
- Geometry.cs
- SQLDoubleStorage.cs
- XmlElementAttribute.cs
- PageTheme.cs
- WindowsIdentity.cs
- WebPartsPersonalization.cs
- EntityDataReader.cs
- WorkflowInstanceExtensionProvider.cs
- LinearGradientBrush.cs
- AuthorizationContext.cs
- UnsafeNativeMethods.cs
- CompilerErrorCollection.cs
- AssignDesigner.xaml.cs
- InfoCardArgumentException.cs
- CompilerGeneratedAttribute.cs
- KeyboardNavigation.cs
- TransformerInfo.cs
- _Win32.cs
- FormConverter.cs
- EdmItemError.cs
- HtmlEmptyTagControlBuilder.cs
- CheckBoxAutomationPeer.cs
- UserControl.cs
- httpserverutility.cs
- SHA512Managed.cs
- EntityDataSourceContextCreatingEventArgs.cs
- EventsTab.cs
- Int64Converter.cs
- XmlIgnoreAttribute.cs