Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- XsltCompileContext.cs
- LogSwitch.cs
- CommandField.cs
- Internal.cs
- MD5CryptoServiceProvider.cs
- MarginsConverter.cs
- RadialGradientBrush.cs
- CTreeGenerator.cs
- XmlWhitespace.cs
- unsafenativemethodstextservices.cs
- TraceSection.cs
- RemoteCryptoDecryptRequest.cs
- Models.cs
- ListBase.cs
- BoundColumn.cs
- MSAAWinEventWrap.cs
- WriteableOnDemandPackagePart.cs
- PolicyDesigner.cs
- DataObjectSettingDataEventArgs.cs
- MetadataItemCollectionFactory.cs
- EndpointConfigContainer.cs
- VirtualDirectoryMapping.cs
- Axis.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- SpellerError.cs
- BorderGapMaskConverter.cs
- SerialPinChanges.cs
- EntityRecordInfo.cs
- HttpHeaderCollection.cs
- MapPathBasedVirtualPathProvider.cs
- ProviderConnectionPointCollection.cs
- LoadRetryConstantStrategy.cs
- ToolStripDropDownItemDesigner.cs
- DataControlFieldCell.cs
- RegionIterator.cs
- SerialPinChanges.cs
- BindingMAnagerBase.cs
- followingquery.cs
- WebPartDescription.cs
- MenuItemAutomationPeer.cs
- StateManagedCollection.cs
- DataControlFieldsEditor.cs
- SessionPageStateSection.cs
- DirectionalLight.cs
- PerfCounters.cs
- StatusBarItemAutomationPeer.cs
- ObjectTokenCategory.cs
- PersianCalendar.cs
- NotifyParentPropertyAttribute.cs
- PageSetupDialog.cs
- SerializationObjectManager.cs
- M3DUtil.cs
- SymmetricCryptoHandle.cs
- ZipIOBlockManager.cs
- ColorDialog.cs
- WorkerRequest.cs
- SmiRecordBuffer.cs
- MessageSecurityOverHttp.cs
- LayoutUtils.cs
- MetadataSection.cs
- PropertyPushdownHelper.cs
- LinqDataSourceView.cs
- SizeConverter.cs
- SoapConverter.cs
- querybuilder.cs
- TargetParameterCountException.cs
- SqlParameter.cs
- WindowsIdentity.cs
- Select.cs
- SchemaComplexType.cs
- StylusCaptureWithinProperty.cs
- TargetControlTypeAttribute.cs
- ColorContextHelper.cs
- ApplicationInfo.cs
- FixedDocument.cs
- Win32NamedPipes.cs
- SafeNativeMethods.cs
- KeysConverter.cs
- SoapAttributes.cs
- ViewKeyConstraint.cs
- ButtonBase.cs
- RowSpanVector.cs
- XmlILCommand.cs
- SessionEndingEventArgs.cs
- ActivityExecutorOperation.cs
- BitmapSource.cs
- TagMapCollection.cs
- SQLSingleStorage.cs
- FontEmbeddingManager.cs
- ConfigsHelper.cs
- ColumnProvider.cs
- Encoder.cs
- UnaryExpression.cs
- Hex.cs
- Enum.cs
- TempFiles.cs
- PeerToPeerException.cs
- CompiledIdentityConstraint.cs
- ApplicationServiceHelper.cs
- InteropTrackingRecord.cs