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
- TabControl.cs
- CellConstant.cs
- MouseEventArgs.cs
- AdornerDecorator.cs
- Int64AnimationUsingKeyFrames.cs
- HttpHandlerAction.cs
- TemplatedWizardStep.cs
- DynamicActivityTypeDescriptor.cs
- RunClient.cs
- WsdlWriter.cs
- OracleConnectionStringBuilder.cs
- ChangeTracker.cs
- SecurityDescriptor.cs
- BackStopAuthenticationModule.cs
- HexParser.cs
- SqlMethodAttribute.cs
- DataList.cs
- DispatcherHooks.cs
- xsdvalidator.cs
- BitmapEffect.cs
- ImageClickEventArgs.cs
- RolePrincipal.cs
- ExpressionBindingCollection.cs
- XmlHierarchicalDataSourceView.cs
- XPathEmptyIterator.cs
- SchemaAttDef.cs
- AuthStoreRoleProvider.cs
- WebBrowserContainer.cs
- Bits.cs
- FixUp.cs
- OdbcParameter.cs
- ExpressionBinding.cs
- PrtTicket_Public_Simple.cs
- BulletChrome.cs
- DataPagerField.cs
- SR.cs
- milexports.cs
- RepeatInfo.cs
- CultureMapper.cs
- InputScopeConverter.cs
- WebPartEditorApplyVerb.cs
- LinkDesigner.cs
- DbCommandDefinition.cs
- BulletedListEventArgs.cs
- GridEntryCollection.cs
- _HTTPDateParse.cs
- DataTable.cs
- RawStylusInput.cs
- TypeConverterHelper.cs
- ArglessEventHandlerProxy.cs
- ExpressionBindings.cs
- PropertyEmitter.cs
- datacache.cs
- NativeMethods.cs
- WindowsSpinner.cs
- PagesSection.cs
- SafeNativeMethods.cs
- ProcessInfo.cs
- ArrayListCollectionBase.cs
- XmlDataSource.cs
- TreeNodeBinding.cs
- HijriCalendar.cs
- Int16AnimationUsingKeyFrames.cs
- OleDbConnection.cs
- Model3D.cs
- DataGridColumn.cs
- querybuilder.cs
- DatatypeImplementation.cs
- unsafenativemethodsother.cs
- Int64Animation.cs
- CodeIdentifier.cs
- RegexReplacement.cs
- PerformanceCounter.cs
- ActivityCodeDomSerializer.cs
- EntitySetBase.cs
- PlanCompiler.cs
- PrintingPermission.cs
- RegexRunner.cs
- MessageHeaderDescription.cs
- ProtocolsConfiguration.cs
- SystemWebSectionGroup.cs
- AttributeEmitter.cs
- XmlElementList.cs
- CorrelationResolver.cs
- DataGridViewColumnEventArgs.cs
- CodeMemberProperty.cs
- ValidationErrorInfo.cs
- ClientTarget.cs
- ItemsPanelTemplate.cs
- VectorKeyFrameCollection.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- ParserOptions.cs
- AllMembershipCondition.cs
- PtsContext.cs
- HtmlTextArea.cs
- ContentValidator.cs
- Win32Native.cs
- QilInvoke.cs
- TransferRequestHandler.cs
- HashJoinQueryOperatorEnumerator.cs