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 / ScrollEventArgs.cs / 1 / ScrollEventArgs.cs
using System; using System.Windows.Controls; using System.Windows; namespace System.Windows.Controls.Primitives { ////// Occurs when the Value property has changed, either by a Scroll event or programmatically. /// ////// public class ScrollEventArgs: RoutedEventArgs { /// /// This is an instance constructor for the ScrollEventArgs class. It /// is constructed with a reference to the event being raised. /// ///Nothing. public ScrollEventArgs(ScrollEventType scrollEventType, double newValue) : base() { _scrollEventType = scrollEventType; _newValue = newValue; RoutedEvent =ScrollBar.ScrollEvent; } ////// Read-only access to the type of scroll event. /// public ScrollEventType ScrollEventType { get { return _scrollEventType; } } ////// Read-only access to new value of ScrollBar. /// public double NewValue { get { return _newValue; } } ////// This method is used to perform the proper type casting in order to /// call the type-safe ScrollEventHandler delegate for the ScrollEvent event. /// /// The handler to invoke. /// The current object along the event's route. ///Nothing. ////// protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget) { ScrollEventHandler handler = (ScrollEventHandler)genericHandler; handler(genericTarget, this); } private ScrollEventType _scrollEventType; private double _newValue; } /// /// This delegate must used by handlers of the Scroll event. /// /// The current element along the event's route. /// The event arguments containing additional information about the event. ///Nothing. public delegate void ScrollEventHandler(object sender, ScrollEventArgs 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; namespace System.Windows.Controls.Primitives { ////// Occurs when the Value property has changed, either by a Scroll event or programmatically. /// ////// public class ScrollEventArgs: RoutedEventArgs { /// /// This is an instance constructor for the ScrollEventArgs class. It /// is constructed with a reference to the event being raised. /// ///Nothing. public ScrollEventArgs(ScrollEventType scrollEventType, double newValue) : base() { _scrollEventType = scrollEventType; _newValue = newValue; RoutedEvent =ScrollBar.ScrollEvent; } ////// Read-only access to the type of scroll event. /// public ScrollEventType ScrollEventType { get { return _scrollEventType; } } ////// Read-only access to new value of ScrollBar. /// public double NewValue { get { return _newValue; } } ////// This method is used to perform the proper type casting in order to /// call the type-safe ScrollEventHandler delegate for the ScrollEvent event. /// /// The handler to invoke. /// The current object along the event's route. ///Nothing. ////// protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget) { ScrollEventHandler handler = (ScrollEventHandler)genericHandler; handler(genericTarget, this); } private ScrollEventType _scrollEventType; private double _newValue; } /// /// This delegate must used by handlers of the Scroll event. /// /// The current element along the event's route. /// The event arguments containing additional information about the event. ///Nothing. public delegate void ScrollEventHandler(object sender, ScrollEventArgs 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
- ScrollViewer.cs
- StreamAsIStream.cs
- CryptoApi.cs
- UnitySerializationHolder.cs
- BitmapData.cs
- MarginsConverter.cs
- RowType.cs
- AsyncOperationManager.cs
- X509Chain.cs
- Exception.cs
- QilStrConcat.cs
- XmlIgnoreAttribute.cs
- Stylus.cs
- SchemaCollectionPreprocessor.cs
- ScriptingWebServicesSectionGroup.cs
- Rect3D.cs
- SubMenuStyleCollection.cs
- MediaPlayer.cs
- OneOfConst.cs
- DataBindingHandlerAttribute.cs
- Guid.cs
- DesignerDataConnection.cs
- KoreanLunisolarCalendar.cs
- CodeAccessPermission.cs
- BamlStream.cs
- TextEffect.cs
- GridViewCancelEditEventArgs.cs
- EntityConnectionStringBuilder.cs
- PropertyDescriptorComparer.cs
- DiscoveryClientRequestChannel.cs
- ISAPIWorkerRequest.cs
- DLinqTableProvider.cs
- ClientUtils.cs
- ErrorFormatter.cs
- ApplicationSettingsBase.cs
- AttachmentCollection.cs
- UnsafeNativeMethodsCLR.cs
- FormatConvertedBitmap.cs
- BuildResult.cs
- LinqDataView.cs
- TableMethodGenerator.cs
- HebrewCalendar.cs
- ForeignKeyConstraint.cs
- lengthconverter.cs
- documentsequencetextcontainer.cs
- CollectionView.cs
- DrawingContext.cs
- MailAddressParser.cs
- SponsorHelper.cs
- CompareValidator.cs
- ScriptHandlerFactory.cs
- DecimalConstantAttribute.cs
- DataGridColumnHeaderItemAutomationPeer.cs
- MsmqTransportBindingElement.cs
- IsolatedStoragePermission.cs
- QueryOperator.cs
- _StreamFramer.cs
- XmlQueryStaticData.cs
- ChangeDirector.cs
- Popup.cs
- CacheHelper.cs
- X509RawDataKeyIdentifierClause.cs
- URLEditor.cs
- DecimalStorage.cs
- StrokeDescriptor.cs
- BitmapSource.cs
- TreeViewEvent.cs
- WebPartVerb.cs
- AdministrationHelpers.cs
- CharKeyFrameCollection.cs
- ControlPaint.cs
- DynamicEndpoint.cs
- UnmanagedHandle.cs
- FormViewPageEventArgs.cs
- SR.cs
- WorkflowControlClient.cs
- CodeDirectoryCompiler.cs
- GatewayDefinition.cs
- Point3DIndependentAnimationStorage.cs
- StorageConditionPropertyMapping.cs
- BoundColumn.cs
- StreamReader.cs
- LowerCaseStringConverter.cs
- RequestSecurityToken.cs
- ListDictionary.cs
- ToolStripSeparator.cs
- XmlException.cs
- OdbcHandle.cs
- PeerCollaborationPermission.cs
- BitmapEffectInput.cs
- ColumnPropertiesGroup.cs
- InvalidEnumArgumentException.cs
- ConfigWriter.cs
- RoleServiceManager.cs
- RangeValuePatternIdentifiers.cs
- SqlCommandBuilder.cs
- ColumnHeaderConverter.cs
- Parameter.cs
- FileCodeGroup.cs
- HashSetEqualityComparer.cs