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
- ControlBindingsConverter.cs
- SemanticKeyElement.cs
- DocumentAutomationPeer.cs
- LocalizationComments.cs
- RegexMatch.cs
- BoolExpr.cs
- XmlToDatasetMap.cs
- XmlTextReaderImpl.cs
- CssStyleCollection.cs
- HttpHandlerAction.cs
- StickyNoteAnnotations.cs
- RIPEMD160.cs
- TransformerTypeCollection.cs
- FontCollection.cs
- RuleSetDialog.Designer.cs
- Baml2006ReaderSettings.cs
- CTreeGenerator.cs
- wgx_render.cs
- XPathNodeIterator.cs
- GB18030Encoding.cs
- DataBoundControl.cs
- OdbcHandle.cs
- DataGridCellsPresenter.cs
- ResourceAttributes.cs
- SystemDiagnosticsSection.cs
- SendingRequestEventArgs.cs
- DesignTimeParseData.cs
- ChtmlPageAdapter.cs
- RuntimeResourceSet.cs
- AuthorizationRule.cs
- AgileSafeNativeMemoryHandle.cs
- XmlCDATASection.cs
- Soap.cs
- ToolStripSettings.cs
- ParagraphVisual.cs
- Conditional.cs
- CellLabel.cs
- ObjectDataSourceSelectingEventArgs.cs
- HttpStreamFormatter.cs
- ConcurrencyBehavior.cs
- SiteMapNodeCollection.cs
- ListViewDeleteEventArgs.cs
- ZipFileInfo.cs
- StorageEndPropertyMapping.cs
- CategoryAttribute.cs
- DoubleStorage.cs
- Pen.cs
- EnumConverter.cs
- StringArrayConverter.cs
- HttpRuntimeSection.cs
- JsonUriDataContract.cs
- WebEventCodes.cs
- WebZone.cs
- XPathMultyIterator.cs
- WebPartsPersonalizationAuthorization.cs
- HtmlTableRowCollection.cs
- PlatformNotSupportedException.cs
- ObjectDataSourceSelectingEventArgs.cs
- ComponentDesigner.cs
- BitHelper.cs
- Context.cs
- GroupStyle.cs
- WrapPanel.cs
- MailDefinition.cs
- SessionEndingEventArgs.cs
- BitmapDownload.cs
- OleDbDataReader.cs
- ChannelSettingsElement.cs
- HtmlInputRadioButton.cs
- SyndicationCategory.cs
- MemberAccessException.cs
- BitmapDecoder.cs
- ReturnEventArgs.cs
- DesignerActionItemCollection.cs
- CodeGenHelper.cs
- ProfessionalColorTable.cs
- WebPartActionVerb.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- OleDbRowUpdatingEvent.cs
- SqlDataSourceFilteringEventArgs.cs
- ContentPlaceHolder.cs
- LinkClickEvent.cs
- HitTestParameters3D.cs
- Polyline.cs
- XmlCDATASection.cs
- RectangleConverter.cs
- ObjectQuery_EntitySqlExtensions.cs
- DocumentSequence.cs
- DisplayInformation.cs
- ZeroOpNode.cs
- ProjectionCamera.cs
- InputScope.cs
- CollectionBase.cs
- Bold.cs
- ZipQueryOperator.cs
- Version.cs
- WindowProviderWrapper.cs
- WebPartCloseVerb.cs
- DictionaryEntry.cs
- DataGridViewComboBoxColumn.cs