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
- ColumnWidthChangingEvent.cs
- StorageMappingItemCollection.cs
- ExtractCollection.cs
- SortDescription.cs
- ParserExtension.cs
- DesignerCalendarAdapter.cs
- ListControlDesigner.cs
- PagesSection.cs
- Int32AnimationUsingKeyFrames.cs
- BuildProvider.cs
- PrinterSettings.cs
- BuilderInfo.cs
- BinaryWriter.cs
- FixedDSBuilder.cs
- XmlSchemaComplexType.cs
- ContextBase.cs
- Header.cs
- EventProperty.cs
- WebControlsSection.cs
- WebException.cs
- ViewManagerAttribute.cs
- EmptyStringExpandableObjectConverter.cs
- RepeatInfo.cs
- CallContext.cs
- _ContextAwareResult.cs
- Calendar.cs
- ModulesEntry.cs
- DrawListViewColumnHeaderEventArgs.cs
- CheckBox.cs
- ClientScriptItem.cs
- TypeCodeDomSerializer.cs
- WebException.cs
- EntityDataSourceColumn.cs
- ViewCellRelation.cs
- ValidationPropertyAttribute.cs
- ResourceExpressionEditor.cs
- ValueExpressions.cs
- Button.cs
- ObjectPersistData.cs
- JobPageOrder.cs
- DataGridColumnFloatingHeader.cs
- SqlParameterCollection.cs
- FixedElement.cs
- SqlDependency.cs
- WorkItem.cs
- XmlDictionary.cs
- HtmlGenericControl.cs
- GenericEnumConverter.cs
- HttpCachePolicy.cs
- ProxyWebPart.cs
- CacheEntry.cs
- XpsPackagingException.cs
- MediaTimeline.cs
- MachineSettingsSection.cs
- CorrelationInitializer.cs
- TableLayoutStyleCollection.cs
- TextStore.cs
- DrawingContextWalker.cs
- ClientSettings.cs
- HttpListenerContext.cs
- OleDbRowUpdatingEvent.cs
- AsymmetricKeyExchangeDeformatter.cs
- HtmlDocument.cs
- NonSerializedAttribute.cs
- PrintController.cs
- ApplicationManager.cs
- KeyConstraint.cs
- ToolboxItem.cs
- HttpRawResponse.cs
- CacheAxisQuery.cs
- HtmlContainerControl.cs
- ScopedKnownTypes.cs
- UnsafePeerToPeerMethods.cs
- SHA512.cs
- X509SecurityTokenAuthenticator.cs
- ScriptComponentDescriptor.cs
- Component.cs
- DataSourceProvider.cs
- XPathNode.cs
- bidPrivateBase.cs
- FixUpCollection.cs
- ContextStack.cs
- ClientRuntimeConfig.cs
- entityreference_tresulttype.cs
- DataException.cs
- StrokeCollectionDefaultValueFactory.cs
- ServicesUtilities.cs
- LinkLabel.cs
- X500Name.cs
- InputLangChangeRequestEvent.cs
- ContainsRowNumberChecker.cs
- CompilerError.cs
- HTMLTagNameToTypeMapper.cs
- DesignerAutoFormatStyle.cs
- InternalResources.cs
- TextEditorLists.cs
- UrlAuthFailedErrorFormatter.cs
- Brush.cs
- DirectionalAction.cs
- ToolStrip.cs