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
- IsolatedStoragePermission.cs
- CapabilitiesSection.cs
- NativeMethodsCLR.cs
- OrCondition.cs
- ConfigsHelper.cs
- XmlEncodedRawTextWriter.cs
- ReferenceEqualityComparer.cs
- TemplatePagerField.cs
- DataProviderNameConverter.cs
- WebPartDeleteVerb.cs
- RIPEMD160.cs
- PenContext.cs
- XPathDescendantIterator.cs
- ControlParameter.cs
- SocketAddress.cs
- SystemInformation.cs
- FieldAccessException.cs
- Transform.cs
- AdapterUtil.cs
- XmlTypeAttribute.cs
- TableCellsCollectionEditor.cs
- ArgumentNullException.cs
- CodeCommentStatement.cs
- RNGCryptoServiceProvider.cs
- DataGridRowHeader.cs
- HwndTarget.cs
- ActivitiesCollection.cs
- Overlapped.cs
- Point4DConverter.cs
- Grant.cs
- XmlKeywords.cs
- URIFormatException.cs
- _AutoWebProxyScriptHelper.cs
- SystemResources.cs
- ToolStripTextBox.cs
- UndoUnit.cs
- Rotation3D.cs
- MtomMessageEncodingElement.cs
- JournalNavigationScope.cs
- WebPartCatalogAddVerb.cs
- ObjectMemberMapping.cs
- PrivilegeNotHeldException.cs
- AsyncCompletedEventArgs.cs
- StyleModeStack.cs
- Processor.cs
- CaseExpr.cs
- Int16AnimationBase.cs
- PresentationTraceSources.cs
- ViewValidator.cs
- StrongNamePublicKeyBlob.cs
- SymmetricSecurityBindingElement.cs
- XPathDescendantIterator.cs
- SchemaCollectionPreprocessor.cs
- UnionCodeGroup.cs
- JournalEntryListConverter.cs
- OdbcDataReader.cs
- Container.cs
- DateTimeFormatInfo.cs
- WindowsFormsHostPropertyMap.cs
- RequestTimeoutManager.cs
- NavigationWindow.cs
- XmlBindingWorker.cs
- TableAdapterManagerNameHandler.cs
- InvalidPropValue.cs
- BordersPage.cs
- ServiceDeploymentInfo.cs
- RowType.cs
- EntityDataSourceChangingEventArgs.cs
- DataRelationPropertyDescriptor.cs
- ContentPlaceHolder.cs
- Splitter.cs
- WebPartMovingEventArgs.cs
- StreamGeometryContext.cs
- Context.cs
- ByteArrayHelperWithString.cs
- GeneratedView.cs
- Atom10FormatterFactory.cs
- PreviewPrintController.cs
- DbConnectionStringCommon.cs
- ProfileInfo.cs
- TransformedBitmap.cs
- FullTextLine.cs
- DiagnosticTrace.cs
- VirtualDirectoryMappingCollection.cs
- HttpProfileGroupBase.cs
- BaseTemplatedMobileComponentEditor.cs
- MaterialCollection.cs
- OperationPerformanceCounters.cs
- IBuiltInEvidence.cs
- IssuedTokenParametersEndpointAddressElement.cs
- SqlMethods.cs
- DecoderExceptionFallback.cs
- TablePatternIdentifiers.cs
- SerTrace.cs
- DesignerCatalogPartChrome.cs
- X509ChainElement.cs
- ProviderCommandInfoUtils.cs
- DataSourceView.cs
- CodeCommentStatement.cs
- CurrencyWrapper.cs