Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / Primitives / DragCompletedEventArgs.cs / 1305600 / DragCompletedEventArgs.cs
using System; using System.Windows.Controls; using System.Windows; namespace System.Windows.Controls.Primitives { ////// This DragCompletedEventArgs class contains additional information about the /// DragCompleted event. /// ////// public class DragCompletedEventArgs: RoutedEventArgs { /// /// This is an instance constructor for the DragCompletedEventArgs class. It /// is constructed with a reference to the event being raised. /// ///Nothing. public DragCompletedEventArgs(double horizontalChange, double verticalChange, bool canceled) : base() { _horizontalChange = horizontalChange; _verticalChange = verticalChange; _wasCanceled = canceled; RoutedEvent=Thumb.DragCompletedEvent; } ////// Read-only access to the horizontal distance between the point where mouse's left-button /// was pressed and the point where mouse's left-button was released /// public double HorizontalChange { get { return _horizontalChange; } } ////// Read-only access to the vertical distance between the point where mouse's left-button /// was pressed and the point where mouse's left-button was released /// public double VerticalChange { get { return _verticalChange; } } ////// Read-only access to boolean states whether the drag operation was canceled or not. /// ///public bool Canceled { get { return _wasCanceled; } } /// /// This method is used to perform the proper type casting in order to /// call the type-safe DragCompletedEventHandler delegate for the DragCompletedEvent event. /// /// The handler to invoke. /// The current object along the event's route. ///Nothing. ////// protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget) { DragCompletedEventHandler handler = (DragCompletedEventHandler)genericHandler; handler(genericTarget, this); } private double _horizontalChange; private double _verticalChange; private bool _wasCanceled; } /// /// This delegate must used by handlers of the DragCompleted event. /// /// The current element along the event's route. /// The event arguments containing additional information about the event. ///Nothing. public delegate void DragCompletedEventHandler(object sender, DragCompletedEventArgs 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; namespace System.Windows.Controls.Primitives { ////// This DragCompletedEventArgs class contains additional information about the /// DragCompleted event. /// ////// public class DragCompletedEventArgs: RoutedEventArgs { /// /// This is an instance constructor for the DragCompletedEventArgs class. It /// is constructed with a reference to the event being raised. /// ///Nothing. public DragCompletedEventArgs(double horizontalChange, double verticalChange, bool canceled) : base() { _horizontalChange = horizontalChange; _verticalChange = verticalChange; _wasCanceled = canceled; RoutedEvent=Thumb.DragCompletedEvent; } ////// Read-only access to the horizontal distance between the point where mouse's left-button /// was pressed and the point where mouse's left-button was released /// public double HorizontalChange { get { return _horizontalChange; } } ////// Read-only access to the vertical distance between the point where mouse's left-button /// was pressed and the point where mouse's left-button was released /// public double VerticalChange { get { return _verticalChange; } } ////// Read-only access to boolean states whether the drag operation was canceled or not. /// ///public bool Canceled { get { return _wasCanceled; } } /// /// This method is used to perform the proper type casting in order to /// call the type-safe DragCompletedEventHandler delegate for the DragCompletedEvent event. /// /// The handler to invoke. /// The current object along the event's route. ///Nothing. ////// protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget) { DragCompletedEventHandler handler = (DragCompletedEventHandler)genericHandler; handler(genericTarget, this); } private double _horizontalChange; private double _verticalChange; private bool _wasCanceled; } /// /// This delegate must used by handlers of the DragCompleted event. /// /// The current element along the event's route. /// The event arguments containing additional information about the event. ///Nothing. public delegate void DragCompletedEventHandler(object sender, DragCompletedEventArgs 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
- TraceContextEventArgs.cs
- XslAst.cs
- SQLConvert.cs
- DesigntimeLicenseContext.cs
- OdbcHandle.cs
- String.cs
- PrintPreviewGraphics.cs
- CqlQuery.cs
- ProfileEventArgs.cs
- StringFreezingAttribute.cs
- SoapConverter.cs
- versioninfo.cs
- Pkcs7Signer.cs
- CatalogPartCollection.cs
- OdbcCommandBuilder.cs
- NeutralResourcesLanguageAttribute.cs
- TextEditorTables.cs
- ListViewGroupCollectionEditor.cs
- HtmlInputHidden.cs
- ObjectHelper.cs
- InfoCardSymmetricCrypto.cs
- SimpleExpression.cs
- StateFinalizationDesigner.cs
- SemaphoreSecurity.cs
- ErrorItem.cs
- PlaceHolder.cs
- SemanticResolver.cs
- TypeUnloadedException.cs
- TagElement.cs
- ToolStripScrollButton.cs
- VisualStyleInformation.cs
- ObjectKeyFrameCollection.cs
- RelationshipFixer.cs
- PerformanceCounterLib.cs
- ToolBarButtonClickEvent.cs
- TaiwanLunisolarCalendar.cs
- ExpressionVisitorHelpers.cs
- ConsumerConnectionPointCollection.cs
- ResourceExpressionBuilder.cs
- BlurBitmapEffect.cs
- ServiceThrottlingElement.cs
- GridEntryCollection.cs
- StreamInfo.cs
- OleDbInfoMessageEvent.cs
- SqlTypesSchemaImporter.cs
- LambdaCompiler.Logical.cs
- DataMisalignedException.cs
- PropertyChangedEventArgs.cs
- DefaultParameterValueAttribute.cs
- OneOfScalarConst.cs
- AttachedAnnotation.cs
- TextProperties.cs
- UpdateEventArgs.cs
- BinaryUtilClasses.cs
- TextTreeTextBlock.cs
- XmlQualifiedName.cs
- CharacterString.cs
- SchemaEntity.cs
- NamespaceTable.cs
- MarkupObject.cs
- LockCookie.cs
- Int32CAMarshaler.cs
- GuidConverter.cs
- TextEditor.cs
- DataGridViewColumnHeaderCell.cs
- _HeaderInfoTable.cs
- Matrix3D.cs
- MouseDevice.cs
- QuaternionKeyFrameCollection.cs
- MarkupExtensionReturnTypeAttribute.cs
- isolationinterop.cs
- DesignerView.xaml.cs
- XmlTypeMapping.cs
- WindowHideOrCloseTracker.cs
- ConnectionStringSettings.cs
- WaitHandleCannotBeOpenedException.cs
- _ConnectionGroup.cs
- SafeNativeMethods.cs
- IncrementalCompileAnalyzer.cs
- OdbcConnectionString.cs
- StateChangeEvent.cs
- ContentIterators.cs
- DataGridTable.cs
- UrlPropertyAttribute.cs
- ScriptManager.cs
- DelegatedStream.cs
- PrintDialog.cs
- SqlDataReaderSmi.cs
- ReflectionPermission.cs
- UInt16Converter.cs
- sqlmetadatafactory.cs
- StringAnimationUsingKeyFrames.cs
- Double.cs
- serverconfig.cs
- TreeChangeInfo.cs
- ping.cs
- RealizationDrawingContextWalker.cs
- MatrixCamera.cs
- HwndHostAutomationPeer.cs
- BorderGapMaskConverter.cs