Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Framework / System / Windows / Controls / Primitives / DragStartedEventArgs.cs / 1 / DragStartedEventArgs.cs
using System; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows; namespace System.Windows.Controls.Primitives { ////// This DragStartedEventArgs class contains additional information about the /// DragStarted event. /// ////// public class DragStartedEventArgs: RoutedEventArgs { /// /// This is an instance constructor for the DragStartedEventArgs class. It /// is constructed with a reference to the event being raised. /// ///Nothing. public DragStartedEventArgs(double horizontalOffset, double verticalOffset) : base() { _horizontalOffset = horizontalOffset; _verticalOffset = verticalOffset; RoutedEvent=Thumb.DragStartedEvent; } ////// Read-only access to the horizontal offset (relative to Thumb's co-ordinate). /// public double HorizontalOffset { get { return _horizontalOffset; } } ////// Read-only access to the vertical offset (relative to Thumb's co-ordinate). /// public double VerticalOffset { get { return _verticalOffset; } } ////// This method is used to perform the proper type casting in order to /// call the type-safe DragStartedEventHandler delegate for the DragStartedEvent event. /// /// The handler to invoke. /// The current object along the event's route. ///Nothing. ////// protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget) { DragStartedEventHandler handler = (DragStartedEventHandler)genericHandler; handler(genericTarget, this); } private double _horizontalOffset; private double _verticalOffset; } /// /// This delegate must used by handlers of the DragStarted event. /// /// The current element along the event's route. /// The event arguments containing additional information about the event. ///Nothing. public delegate void DragStartedEventHandler(object sender, DragStartedEventArgs 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 DragStartedEventArgs class contains additional information about the /// DragStarted event. /// ////// public class DragStartedEventArgs: RoutedEventArgs { /// /// This is an instance constructor for the DragStartedEventArgs class. It /// is constructed with a reference to the event being raised. /// ///Nothing. public DragStartedEventArgs(double horizontalOffset, double verticalOffset) : base() { _horizontalOffset = horizontalOffset; _verticalOffset = verticalOffset; RoutedEvent=Thumb.DragStartedEvent; } ////// Read-only access to the horizontal offset (relative to Thumb's co-ordinate). /// public double HorizontalOffset { get { return _horizontalOffset; } } ////// Read-only access to the vertical offset (relative to Thumb's co-ordinate). /// public double VerticalOffset { get { return _verticalOffset; } } ////// This method is used to perform the proper type casting in order to /// call the type-safe DragStartedEventHandler delegate for the DragStartedEvent event. /// /// The handler to invoke. /// The current object along the event's route. ///Nothing. ////// protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget) { DragStartedEventHandler handler = (DragStartedEventHandler)genericHandler; handler(genericTarget, this); } private double _horizontalOffset; private double _verticalOffset; } /// /// This delegate must used by handlers of the DragStarted event. /// /// The current element along the event's route. /// The event arguments containing additional information about the event. ///Nothing. public delegate void DragStartedEventHandler(object sender, DragStartedEventArgs 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
- RuntimeUtils.cs
- SqlSupersetValidator.cs
- EventDescriptor.cs
- odbcmetadatafactory.cs
- IdentityModelDictionary.cs
- RegexWorker.cs
- Switch.cs
- QilGeneratorEnv.cs
- TextTreeDeleteContentUndoUnit.cs
- XmlArrayItemAttributes.cs
- ObjectStorage.cs
- XMLSyntaxException.cs
- ZeroOpNode.cs
- SqlParameterizer.cs
- SrgsSemanticInterpretationTag.cs
- BindToObject.cs
- SemanticTag.cs
- X509Chain.cs
- HostingEnvironmentException.cs
- ConfigXmlWhitespace.cs
- ScrollContentPresenter.cs
- MapPathBasedVirtualPathProvider.cs
- MatrixStack.cs
- InputReportEventArgs.cs
- InvokePattern.cs
- RightsManagementErrorHandler.cs
- TextEvent.cs
- InputBuffer.cs
- DataTemplate.cs
- IndentedTextWriter.cs
- XmlnsCache.cs
- CheckPair.cs
- FrugalList.cs
- DataServiceHostFactory.cs
- ImageCodecInfo.cs
- SocketManager.cs
- XmlSchemaObjectCollection.cs
- WebAdminConfigurationHelper.cs
- VScrollBar.cs
- DbUpdateCommandTree.cs
- PropertyItemInternal.cs
- DbXmlEnabledProviderManifest.cs
- Misc.cs
- XmlLanguageConverter.cs
- FrameworkElement.cs
- LoopExpression.cs
- StrokeCollection.cs
- Stacktrace.cs
- CookielessHelper.cs
- StreamSecurityUpgradeAcceptor.cs
- BamlResourceDeserializer.cs
- ShaderEffect.cs
- SQLMoneyStorage.cs
- CachedTypeface.cs
- SafeReversePInvokeHandle.cs
- WindowsRichEdit.cs
- HwndSourceParameters.cs
- TileBrush.cs
- ComplexTypeEmitter.cs
- SRGSCompiler.cs
- EntityContainerRelationshipSetEnd.cs
- NavigateUrlConverter.cs
- PropertyGridView.cs
- ClassData.cs
- AssemblyAttributesGoHere.cs
- CompilerLocalReference.cs
- NavigationWindow.cs
- SpeechRecognitionEngine.cs
- UnitySerializationHolder.cs
- KoreanCalendar.cs
- GenericAuthenticationEventArgs.cs
- BindingExpression.cs
- FreezableDefaultValueFactory.cs
- DataStorage.cs
- CommonGetThemePartSize.cs
- AtomicFile.cs
- RequestCachePolicyConverter.cs
- EntitySetBaseCollection.cs
- BooleanFunctions.cs
- PermissionSetEnumerator.cs
- ReferenceCountedObject.cs
- WpfWebRequestHelper.cs
- ExplicitDiscriminatorMap.cs
- EventProxy.cs
- Dump.cs
- HttpListenerRequestTraceRecord.cs
- OleTxTransactionInfo.cs
- XmlILTrace.cs
- XmlName.cs
- DynamicFilterExpression.cs
- _Rfc2616CacheValidators.cs
- GPPOINT.cs
- StrongNamePublicKeyBlob.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- UdpChannelFactory.cs
- SyndicationSerializer.cs
- StreamingContext.cs
- RightsManagementInformation.cs
- RegexCode.cs
- ProtocolsConfigurationHandler.cs