Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- PageEventArgs.cs
- View.cs
- ResourceManagerWrapper.cs
- BookmarkManager.cs
- EffectiveValueEntry.cs
- Effect.cs
- Perspective.cs
- DesignerCategoryAttribute.cs
- ResourceManager.cs
- Unit.cs
- ArrayConverter.cs
- UIHelper.cs
- ScrollProviderWrapper.cs
- SpotLight.cs
- MessageContractImporter.cs
- HostingEnvironmentSection.cs
- EventlogProvider.cs
- ComponentDispatcherThread.cs
- SizeChangedInfo.cs
- TerminatingOperationBehavior.cs
- DynamicValueConverter.cs
- ServiceRoute.cs
- XPathArrayIterator.cs
- Enum.cs
- ControlPropertyNameConverter.cs
- LockCookie.cs
- SettingsAttributeDictionary.cs
- HMACSHA512.cs
- ViewStateAttachedPropertyFeature.cs
- UmAlQuraCalendar.cs
- WebHostedComPlusServiceHost.cs
- CodeCommentStatementCollection.cs
- RegionIterator.cs
- PageThemeParser.cs
- _emptywebproxy.cs
- ChannelManager.cs
- DiscoveryReference.cs
- CopyCodeAction.cs
- ActivityExecutorDelegateInfo.cs
- CancelEventArgs.cs
- SignedXml.cs
- CharacterBufferReference.cs
- UriSection.cs
- TransformedBitmap.cs
- ScriptControlManager.cs
- ViewCellRelation.cs
- AvTrace.cs
- HttpSocketManager.cs
- FixedDocumentPaginator.cs
- Imaging.cs
- SqlBuffer.cs
- ListDictionaryInternal.cs
- COM2PropertyDescriptor.cs
- CheckPair.cs
- PageThemeBuildProvider.cs
- ReverseInheritProperty.cs
- UserNameSecurityTokenParameters.cs
- CodeVariableReferenceExpression.cs
- _HeaderInfo.cs
- CodeExporter.cs
- DataMemberConverter.cs
- TextBlockAutomationPeer.cs
- Viewport2DVisual3D.cs
- panel.cs
- MenuItemStyleCollection.cs
- recordstatescratchpad.cs
- MobileUITypeEditor.cs
- BoundsDrawingContextWalker.cs
- SqlTypeConverter.cs
- SafeNativeMethods.cs
- KeyInstance.cs
- MatrixTransform.cs
- GeneralTransform.cs
- UpdateCommandGenerator.cs
- ScrollableControl.cs
- ForEachAction.cs
- ToolStripItemClickedEventArgs.cs
- HttpCachePolicy.cs
- MdiWindowListStrip.cs
- APCustomTypeDescriptor.cs
- ExternalException.cs
- ConsumerConnectionPoint.cs
- CorrelationKeyCalculator.cs
- WinEventTracker.cs
- ExpressionVisitor.cs
- WebPartHeaderCloseVerb.cs
- SecurityRuntime.cs
- CreateUserErrorEventArgs.cs
- ScrollChrome.cs
- WebServicesInteroperability.cs
- ImageSourceValueSerializer.cs
- StylusEventArgs.cs
- Page.cs
- InfocardExtendedInformationEntry.cs
- TransformCollection.cs
- XmlAttributeCache.cs
- ClientApiGenerator.cs
- EntityClientCacheEntry.cs
- PersonalizationStateQuery.cs
- CookielessHelper.cs