Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Framework / System / Windows / Controls / Primitives / DragStartedEventArgs.cs / 1 / DragStartedEventArgs.cs
using System; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows; namespace System.Windows.Controls.Primitives { ////// This DragStartedEventArgs class contains additional information about the /// DragStarted event. /// ////// public class DragStartedEventArgs: RoutedEventArgs { /// /// This is an instance constructor for the DragStartedEventArgs class. It /// is constructed with a reference to the event being raised. /// ///Nothing. public DragStartedEventArgs(double horizontalOffset, double verticalOffset) : base() { _horizontalOffset = horizontalOffset; _verticalOffset = verticalOffset; RoutedEvent=Thumb.DragStartedEvent; } ////// Read-only access to the horizontal offset (relative to Thumb's co-ordinate). /// public double HorizontalOffset { get { return _horizontalOffset; } } ////// Read-only access to the vertical offset (relative to Thumb's co-ordinate). /// public double VerticalOffset { get { return _verticalOffset; } } ////// This method is used to perform the proper type casting in order to /// call the type-safe DragStartedEventHandler delegate for the DragStartedEvent event. /// /// The handler to invoke. /// The current object along the event's route. ///Nothing. ////// protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget) { DragStartedEventHandler handler = (DragStartedEventHandler)genericHandler; handler(genericTarget, this); } private double _horizontalOffset; private double _verticalOffset; } /// /// This delegate must used by handlers of the DragStarted event. /// /// The current element along the event's route. /// The event arguments containing additional information about the event. ///Nothing. public delegate void DragStartedEventHandler(object sender, DragStartedEventArgs 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 DragStartedEventArgs class contains additional information about the /// DragStarted event. /// ////// public class DragStartedEventArgs: RoutedEventArgs { /// /// This is an instance constructor for the DragStartedEventArgs class. It /// is constructed with a reference to the event being raised. /// ///Nothing. public DragStartedEventArgs(double horizontalOffset, double verticalOffset) : base() { _horizontalOffset = horizontalOffset; _verticalOffset = verticalOffset; RoutedEvent=Thumb.DragStartedEvent; } ////// Read-only access to the horizontal offset (relative to Thumb's co-ordinate). /// public double HorizontalOffset { get { return _horizontalOffset; } } ////// Read-only access to the vertical offset (relative to Thumb's co-ordinate). /// public double VerticalOffset { get { return _verticalOffset; } } ////// This method is used to perform the proper type casting in order to /// call the type-safe DragStartedEventHandler delegate for the DragStartedEvent event. /// /// The handler to invoke. /// The current object along the event's route. ///Nothing. ////// protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget) { DragStartedEventHandler handler = (DragStartedEventHandler)genericHandler; handler(genericTarget, this); } private double _horizontalOffset; private double _verticalOffset; } /// /// This delegate must used by handlers of the DragStarted event. /// /// The current element along the event's route. /// The event arguments containing additional information about the event. ///Nothing. public delegate void DragStartedEventHandler(object sender, DragStartedEventArgs 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
- ComboBox.cs
- OleDbStruct.cs
- PanelDesigner.cs
- OutOfProcStateClientManager.cs
- ListControlBuilder.cs
- DBConnection.cs
- ContourSegment.cs
- StylusDownEventArgs.cs
- KeyboardDevice.cs
- BeginCreateSecurityTokenRequest.cs
- ModelTreeManager.cs
- GPPOINTF.cs
- SqlFormatter.cs
- ReflectionUtil.cs
- AsymmetricCryptoHandle.cs
- CodeDirectionExpression.cs
- SoapCommonClasses.cs
- RepeatBehavior.cs
- DelegateArgumentValue.cs
- XPathSingletonIterator.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- PriorityQueue.cs
- Base64Decoder.cs
- PrintEvent.cs
- CodeArrayCreateExpression.cs
- GridView.cs
- WebServiceTypeData.cs
- LinqToSqlWrapper.cs
- SelectionItemPattern.cs
- ScriptingRoleServiceSection.cs
- HuffCodec.cs
- ConfigXmlAttribute.cs
- Int16Storage.cs
- DataViewManagerListItemTypeDescriptor.cs
- OleDbDataReader.cs
- VolatileEnlistmentState.cs
- RawStylusSystemGestureInputReport.cs
- ErrorFormatterPage.cs
- Assert.cs
- XsltArgumentList.cs
- CqlBlock.cs
- FilteredReadOnlyMetadataCollection.cs
- OleDbDataAdapter.cs
- FixedBufferAttribute.cs
- HtmlGenericControl.cs
- ApplicationException.cs
- PrtCap_Public.cs
- BackgroundFormatInfo.cs
- ControlCommandSet.cs
- ToolStripComboBox.cs
- ConfigurationLockCollection.cs
- KeyValueSerializer.cs
- CharConverter.cs
- CodeTypeMember.cs
- PageBreakRecord.cs
- PagerSettings.cs
- InputLangChangeRequestEvent.cs
- HostVisual.cs
- EventHandlerList.cs
- MonthChangedEventArgs.cs
- SmiEventStream.cs
- WriteTimeStream.cs
- WorkflowItemsPresenter.cs
- HandleExceptionArgs.cs
- Scene3D.cs
- OracleException.cs
- Compress.cs
- ObjectDataSourceEventArgs.cs
- ArrayExtension.cs
- BridgeDataRecord.cs
- FtpWebRequest.cs
- InputLanguageSource.cs
- RepeatButtonAutomationPeer.cs
- GridErrorDlg.cs
- ClientBuildManager.cs
- TypeBrowserDialog.cs
- Propagator.cs
- AdCreatedEventArgs.cs
- DataTableMappingCollection.cs
- ConnectionsZone.cs
- DataException.cs
- SizeIndependentAnimationStorage.cs
- HostedHttpTransportManager.cs
- Pkcs9Attribute.cs
- ErrorFormatter.cs
- EntityCommand.cs
- SamlAssertionKeyIdentifierClause.cs
- SqlSelectStatement.cs
- UpdateCommandGenerator.cs
- DataControlButton.cs
- ProfileModule.cs
- InternalResources.cs
- OracleTimeSpan.cs
- AsymmetricKeyExchangeDeformatter.cs
- ZipIOLocalFileDataDescriptor.cs
- TimeStampChecker.cs
- EnumBuilder.cs
- codemethodreferenceexpression.cs
- BoundingRectTracker.cs
- BitmapEffectRenderDataResource.cs