Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- BitmapMetadataBlob.cs
- MailAddressCollection.cs
- ExtensionQuery.cs
- TokenBasedSetEnumerator.cs
- DataGridCell.cs
- Win32Exception.cs
- ConfigurationSection.cs
- XamlClipboardData.cs
- NameTable.cs
- SafeBitVector32.cs
- KeyEvent.cs
- FileFormatException.cs
- PackagingUtilities.cs
- DiagnosticsConfigurationHandler.cs
- IconConverter.cs
- StreamAsIStream.cs
- ConfigurationStrings.cs
- InfoCardHelper.cs
- CommonGetThemePartSize.cs
- TypeSystem.cs
- EdmValidator.cs
- Span.cs
- BulletedList.cs
- XmlSchemaAttributeGroup.cs
- HwndSubclass.cs
- SizeIndependentAnimationStorage.cs
- ValueProviderWrapper.cs
- IdentityManager.cs
- VisualState.cs
- Convert.cs
- linebase.cs
- SqlAliaser.cs
- GenericTextProperties.cs
- PagerSettings.cs
- ConfigXmlCDataSection.cs
- CheckBox.cs
- EndOfStreamException.cs
- MapPathBasedVirtualPathProvider.cs
- WorkflowWebService.cs
- PolicyManager.cs
- BoolExpr.cs
- WebResourceAttribute.cs
- CompiledQueryCacheKey.cs
- XdrBuilder.cs
- NetDataContractSerializer.cs
- DataTemplateSelector.cs
- ErrorFormatterPage.cs
- RoleGroupCollection.cs
- PresentationSource.cs
- SqlNamer.cs
- _AutoWebProxyScriptWrapper.cs
- StrokeFIndices.cs
- ScriptingProfileServiceSection.cs
- DataGridViewIntLinkedList.cs
- PrintDialog.cs
- CssClassPropertyAttribute.cs
- ForEachAction.cs
- Literal.cs
- DescendantOverDescendantQuery.cs
- PropertyCollection.cs
- DefaultAssemblyResolver.cs
- ImageIndexConverter.cs
- TrustManagerMoreInformation.cs
- XmlSerializableWriter.cs
- DataGridCommandEventArgs.cs
- Base64Stream.cs
- AsyncStreamReader.cs
- Transform3DGroup.cs
- RsaSecurityToken.cs
- ExpanderAutomationPeer.cs
- DataGridViewLinkColumn.cs
- AdjustableArrowCap.cs
- DataGridViewButtonColumn.cs
- DragStartedEventArgs.cs
- DependencyObjectType.cs
- DebugController.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- MatcherBuilder.cs
- Command.cs
- AppDomainFactory.cs
- webbrowsersite.cs
- Stack.cs
- ImportCatalogPart.cs
- MailWebEventProvider.cs
- DataGridViewCellPaintingEventArgs.cs
- URLMembershipCondition.cs
- ConfigurationSectionGroup.cs
- NGCSerializationManager.cs
- StylusPointCollection.cs
- EmptyTextWriter.cs
- TcpConnectionPool.cs
- MetadataCacheItem.cs
- MgmtResManager.cs
- DataRecordInfo.cs
- DataServiceQueryException.cs
- ColorTransformHelper.cs
- TextFormatterImp.cs
- RoleManagerModule.cs
- CultureSpecificCharacterBufferRange.cs
- DesignerView.xaml.cs