Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / Primitives / ScrollEventArgs.cs / 1305600 / 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
- MarkupExtensionParser.cs
- XmlLanguageConverter.cs
- LocationReferenceValue.cs
- SourceItem.cs
- DbXmlEnabledProviderManifest.cs
- CharEntityEncoderFallback.cs
- NameNode.cs
- UIElement3DAutomationPeer.cs
- OutputCacheProfile.cs
- XmlBindingWorker.cs
- DescendantQuery.cs
- SessionPageStatePersister.cs
- ApplicationException.cs
- PopOutPanel.cs
- XomlCompilerResults.cs
- FontWeights.cs
- XNodeValidator.cs
- DataServiceCollectionOfT.cs
- SmtpReplyReaderFactory.cs
- MetadataArtifactLoaderResource.cs
- FeatureSupport.cs
- SkewTransform.cs
- ConfigXmlAttribute.cs
- Column.cs
- ExtractorMetadata.cs
- DefaultHttpHandler.cs
- input.cs
- IncrementalCompileAnalyzer.cs
- IntSumAggregationOperator.cs
- KeyGestureValueSerializer.cs
- TextDecorationCollection.cs
- UIElementParagraph.cs
- XPathSelfQuery.cs
- Calendar.cs
- IndexingContentUnit.cs
- pingexception.cs
- DisplayInformation.cs
- TemplateXamlTreeBuilder.cs
- NamespaceQuery.cs
- FormatterConverter.cs
- SemaphoreFullException.cs
- VectorKeyFrameCollection.cs
- HttpAsyncResult.cs
- XhtmlBasicValidationSummaryAdapter.cs
- AnonymousIdentificationModule.cs
- EditingMode.cs
- EditBehavior.cs
- EnvelopedSignatureTransform.cs
- Error.cs
- ObjectQuery_EntitySqlExtensions.cs
- AddInStore.cs
- StylusPointPropertyInfo.cs
- KnownIds.cs
- SystemPens.cs
- StrongName.cs
- XmlSchemaExporter.cs
- DataBindingCollection.cs
- FindProgressChangedEventArgs.cs
- ReadWriteSpinLock.cs
- OpenFileDialog.cs
- GuidTagList.cs
- GridViewColumnCollection.cs
- ISAPIApplicationHost.cs
- OleDbPermission.cs
- DocumentViewerConstants.cs
- TypeKeyValue.cs
- CommunicationObjectAbortedException.cs
- HtmlControl.cs
- UniqueConstraint.cs
- DtdParser.cs
- MultipleViewPattern.cs
- _AuthenticationState.cs
- HttpCapabilitiesSectionHandler.cs
- ProfileProvider.cs
- DifferencingCollection.cs
- DataStreamFromComStream.cs
- LocatorBase.cs
- EFColumnProvider.cs
- DllNotFoundException.cs
- ClientTarget.cs
- Vector3D.cs
- PersonalizationProviderHelper.cs
- ConfigXmlComment.cs
- RadioButton.cs
- OpenTypeLayout.cs
- CodeGen.cs
- Vector3DCollectionValueSerializer.cs
- VisualStyleTypesAndProperties.cs
- BindingGroup.cs
- NonPrimarySelectionGlyph.cs
- RTTypeWrapper.cs
- ObjectQuery.cs
- UInt64.cs
- InputDevice.cs
- PartialClassGenerationTask.cs
- SQLInt64.cs
- ChannelProtectionRequirements.cs
- XPathNodeInfoAtom.cs
- TextParentUndoUnit.cs
- WindowsScrollBarBits.cs