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 / 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
- FileFormatException.cs
- PageThemeCodeDomTreeGenerator.cs
- DetailsViewModeEventArgs.cs
- SerializableAttribute.cs
- AtomServiceDocumentSerializer.cs
- WebBrowser.cs
- RawContentTypeMapper.cs
- TypeBuilderInstantiation.cs
- ResolveNameEventArgs.cs
- CodeValidator.cs
- GenericEnumerator.cs
- DataObjectPastingEventArgs.cs
- XsltContext.cs
- _ConnectStream.cs
- DrawingImage.cs
- JsonReaderDelegator.cs
- EventSinkActivity.cs
- Thickness.cs
- DebugHandleTracker.cs
- DataGridViewRow.cs
- PathStreamGeometryContext.cs
- SessionStateModule.cs
- SourceInterpreter.cs
- Size.cs
- XmlDataImplementation.cs
- ArrangedElementCollection.cs
- StringKeyFrameCollection.cs
- TraceContextEventArgs.cs
- TemplateField.cs
- PreservationFileReader.cs
- XmlAtomicValue.cs
- View.cs
- DeflateStream.cs
- ClientBuildManager.cs
- RecognitionResult.cs
- BindingWorker.cs
- MultiplexingDispatchMessageFormatter.cs
- DateRangeEvent.cs
- AstTree.cs
- SqlGatherProducedAliases.cs
- ErrorActivity.cs
- MatrixTransform3D.cs
- PackWebRequest.cs
- BindingListCollectionView.cs
- RoutedEvent.cs
- EventSchemaTraceListener.cs
- WindowsContainer.cs
- FaultPropagationRecord.cs
- ConnectionStringSettingsCollection.cs
- EntityDataSourceColumn.cs
- TransformCryptoHandle.cs
- FillRuleValidation.cs
- StaticDataManager.cs
- FontCacheLogic.cs
- DocobjHost.cs
- HTTPNotFoundHandler.cs
- CurrentTimeZone.cs
- XmlUtilWriter.cs
- XmlQueryTypeFactory.cs
- TextBoxLine.cs
- CngKeyBlobFormat.cs
- OdbcUtils.cs
- DataColumnCollection.cs
- CultureInfoConverter.cs
- NotifyCollectionChangedEventArgs.cs
- ContainerFilterService.cs
- WinEventQueueItem.cs
- ImageField.cs
- FontFamilyIdentifier.cs
- DataGridSortCommandEventArgs.cs
- RadioButtonFlatAdapter.cs
- FixedSOMPageConstructor.cs
- DiagnosticsElement.cs
- StylusDevice.cs
- DuplicateWaitObjectException.cs
- Operators.cs
- CompilerWrapper.cs
- AgileSafeNativeMemoryHandle.cs
- CompiledAction.cs
- CommandField.cs
- QueryAccessibilityHelpEvent.cs
- UrlAuthorizationModule.cs
- IconHelper.cs
- IEnumerable.cs
- XmlSchemaComplexType.cs
- errorpatternmatcher.cs
- ComboBox.cs
- UnionExpr.cs
- RegexParser.cs
- ButtonPopupAdapter.cs
- ChildrenQuery.cs
- SignedXml.cs
- PostBackTrigger.cs
- SQLCharsStorage.cs
- WebPartConnectionsCloseVerb.cs
- CreateUserWizardStep.cs
- Simplifier.cs
- _OSSOCK.cs
- Cursor.cs
- GridViewUpdateEventArgs.cs