Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / MouseOverProperty.cs / 1305600 / MouseOverProperty.cs
using System; using MS.Internal.KnownBoxes; using System.Windows.Input; namespace System.Windows { ///////////////////////////////////////////////////////////////////////// internal class MouseOverProperty : ReverseInheritProperty { ///////////////////////////////////////////////////////////////////// internal MouseOverProperty() : base( UIElement.IsMouseOverPropertyKey, CoreFlags.IsMouseOverCache, CoreFlags.IsMouseOverChanged) { } ///////////////////////////////////////////////////////////////////// internal override void FireNotifications(UIElement uie, ContentElement ce, UIElement3D uie3D, bool oldValue) { // Before we fire the mouse event we need to figure if the notification is still relevant. // This is because it is possible that the mouse state has changed during the previous // property engine callout. Example: Consider a MessageBox being displayed during the // IsMouseOver OnPropertyChanged override. bool shouldFireNotification = false; if (uie != null) { shouldFireNotification = (!oldValue && uie.IsMouseOver) || (oldValue && !uie.IsMouseOver); } else if (ce != null) { shouldFireNotification = (!oldValue && ce.IsMouseOver) || (oldValue && !ce.IsMouseOver); } else if (uie3D != null) { shouldFireNotification = (!oldValue && uie3D.IsMouseOver) || (oldValue && !uie3D.IsMouseOver); } if (shouldFireNotification) { MouseEventArgs mouseEventArgs = new MouseEventArgs(Mouse.PrimaryDevice, Environment.TickCount, Mouse.PrimaryDevice.StylusDevice); mouseEventArgs.RoutedEvent = oldValue ? Mouse.MouseLeaveEvent : Mouse.MouseEnterEvent; if (uie != null) { uie.RaiseEvent(mouseEventArgs); } else if (ce != null) { ce.RaiseEvent(mouseEventArgs); } else if (uie3D != null) { uie3D.RaiseEvent(mouseEventArgs); } } } } } // 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
- AsyncDataRequest.cs
- ProfileService.cs
- Latin1Encoding.cs
- Win32Exception.cs
- DBConcurrencyException.cs
- Transform.cs
- FilteredDataSetHelper.cs
- ThreadExceptionDialog.cs
- AsyncOperationLifetimeManager.cs
- KerberosReceiverSecurityToken.cs
- DataGridViewColumnDesignTimeVisibleAttribute.cs
- DrawListViewItemEventArgs.cs
- SimpleWebHandlerParser.cs
- EntityClientCacheKey.cs
- NavigationService.cs
- ContextMarshalException.cs
- BitStack.cs
- DelimitedListTraceListener.cs
- DecoderExceptionFallback.cs
- Converter.cs
- PagerSettings.cs
- WebPartUserCapability.cs
- RadioButtonRenderer.cs
- TypeSystem.cs
- StreamGeometryContext.cs
- complextypematerializer.cs
- messageonlyhwndwrapper.cs
- IteratorFilter.cs
- SmtpFailedRecipientException.cs
- SiteMapDataSource.cs
- ErrorWrapper.cs
- MethodExpr.cs
- MimeMapping.cs
- EncoderFallback.cs
- CodeTypeParameterCollection.cs
- CompModSwitches.cs
- ProgramNode.cs
- translator.cs
- LayoutSettings.cs
- ImageCollectionCodeDomSerializer.cs
- WorkflowItemPresenter.cs
- XsltFunctions.cs
- __Filters.cs
- XmlBinaryReaderSession.cs
- BinaryCommonClasses.cs
- ExceptionUtil.cs
- Odbc32.cs
- XmlBoundElement.cs
- BoundColumn.cs
- StrokeNodeOperations.cs
- Renderer.cs
- Schema.cs
- TrackPoint.cs
- ContentType.cs
- Propagator.ExtentPlaceholderCreator.cs
- HttpConfigurationContext.cs
- HttpChannelHelpers.cs
- ScaleTransform3D.cs
- HttpHostedTransportConfiguration.cs
- SequentialUshortCollection.cs
- FieldInfo.cs
- ArrayMergeHelper.cs
- AssemblyAttributes.cs
- PlatformNotSupportedException.cs
- ThreadStateException.cs
- EdmProperty.cs
- ControlBindingsCollection.cs
- Animatable.cs
- SimpleFieldTemplateFactory.cs
- EntryPointNotFoundException.cs
- MailMessageEventArgs.cs
- XmlSchemaElement.cs
- WebPartCancelEventArgs.cs
- TransformConverter.cs
- AutoSizeComboBox.cs
- MemberAccessException.cs
- DataBoundLiteralControl.cs
- DataAdapter.cs
- ConfigXmlDocument.cs
- TextRangeAdaptor.cs
- XamlPoint3DCollectionSerializer.cs
- BoundingRectTracker.cs
- MaterializeFromAtom.cs
- PrePrepareMethodAttribute.cs
- SqlAggregateChecker.cs
- KeysConverter.cs
- SiteMapDataSourceView.cs
- SettingsProviderCollection.cs
- MinimizableAttributeTypeConverter.cs
- XmlBuffer.cs
- CodeDomConfigurationHandler.cs
- SpeakInfo.cs
- IntSecurity.cs
- Scheduler.cs
- NullRuntimeConfig.cs
- OleDbConnectionInternal.cs
- SHA512.cs
- DataGridCellInfo.cs
- XmlSchemaType.cs
- Int16AnimationBase.cs