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
- EllipseGeometry.cs
- StandardToolWindows.cs
- ObjectCloneHelper.cs
- RtfFormatStack.cs
- SystemIPAddressInformation.cs
- ToolstripProfessionalRenderer.cs
- DependencyPropertyConverter.cs
- ModelUIElement3D.cs
- SelectionEditingBehavior.cs
- EdmComplexTypeAttribute.cs
- MenuItemStyle.cs
- ObjectDataSourceView.cs
- UnsafeNativeMethodsPenimc.cs
- BindingEntityInfo.cs
- MimeFormReflector.cs
- ExpressionUtilities.cs
- EntityClassGenerator.cs
- NavigationProgressEventArgs.cs
- ComboBox.cs
- SubpageParaClient.cs
- DataGridItemCollection.cs
- TimeZoneInfo.cs
- RNGCryptoServiceProvider.cs
- ComboBoxItem.cs
- HideDisabledControlAdapter.cs
- SpeechAudioFormatInfo.cs
- CircleEase.cs
- QueryRewriter.cs
- InkCollectionBehavior.cs
- CodeExpressionStatement.cs
- BitmapScalingModeValidation.cs
- Path.cs
- UriTemplateCompoundPathSegment.cs
- SiteMap.cs
- SmiContextFactory.cs
- ArcSegment.cs
- URLBuilder.cs
- VideoDrawing.cs
- Trace.cs
- RsaSecurityToken.cs
- TreeView.cs
- TemplateBaseAction.cs
- MarkupCompiler.cs
- ControlCachePolicy.cs
- WebPartHeaderCloseVerb.cs
- EventBuilder.cs
- FileUpload.cs
- XPathDocumentNavigator.cs
- ReverseInheritProperty.cs
- CaseInsensitiveComparer.cs
- ConnectionStringsExpressionBuilder.cs
- ParagraphVisual.cs
- NotifyParentPropertyAttribute.cs
- ToolStripDesigner.cs
- EntityContainerEmitter.cs
- FamilyMap.cs
- CompleteWizardStep.cs
- StorageInfo.cs
- XsdDuration.cs
- DataGridColumn.cs
- DynamicField.cs
- ProfileSection.cs
- ExpressionNormalizer.cs
- FileLoadException.cs
- ExpressionBuilder.cs
- DataSourceXmlElementAttribute.cs
- DataControlFieldHeaderCell.cs
- NavigateEvent.cs
- AuthenticationModeHelper.cs
- CallbackCorrelationInitializer.cs
- SystemIcmpV4Statistics.cs
- Speller.cs
- DataGridViewComboBoxEditingControl.cs
- uribuilder.cs
- Thread.cs
- DynamicActivityXamlReader.cs
- InputLanguageEventArgs.cs
- PartitionerStatic.cs
- CollectionChangedEventManager.cs
- VarInfo.cs
- UndirectedGraph.cs
- DataBindingExpressionBuilder.cs
- BaseTemplateBuildProvider.cs
- CodeDirectionExpression.cs
- PermissionAttributes.cs
- ResourceProperty.cs
- QuaternionRotation3D.cs
- AsyncOperationContext.cs
- CacheAxisQuery.cs
- SerializationSectionGroup.cs
- CodeObject.cs
- Point.cs
- ProcessHostServerConfig.cs
- __Error.cs
- MembershipPasswordException.cs
- CriticalFileToken.cs
- ListViewInsertionMark.cs
- SrgsElement.cs
- PolicyValidationException.cs
- FlowDocument.cs