Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / System / Windows / MouseOverProperty.cs / 2 / 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
- MasterPageParser.cs
- AvTraceFormat.cs
- EntityViewContainer.cs
- QueryHandler.cs
- DataAccessor.cs
- RuntimeWrappedException.cs
- SmtpLoginAuthenticationModule.cs
- Vector3DConverter.cs
- X509IssuerSerialKeyIdentifierClause.cs
- GetWinFXPath.cs
- ClientOptions.cs
- safemediahandle.cs
- SerializableAttribute.cs
- CodeDirectionExpression.cs
- StringValidatorAttribute.cs
- XslAst.cs
- XmlAttributeCollection.cs
- Random.cs
- ListViewHitTestInfo.cs
- IriParsingElement.cs
- Metafile.cs
- XmlProcessingInstruction.cs
- TcpChannelHelper.cs
- CodeAttributeDeclarationCollection.cs
- ParameterBuilder.cs
- Encoder.cs
- ObjectViewQueryResultData.cs
- Durable.cs
- _FtpControlStream.cs
- CellTreeNode.cs
- SymmetricAlgorithm.cs
- WindowsListViewItem.cs
- Signature.cs
- TextAutomationPeer.cs
- Vertex.cs
- NameSpaceEvent.cs
- HeaderedItemsControl.cs
- AsyncOperation.cs
- CharStorage.cs
- ScriptDescriptor.cs
- MetadataCollection.cs
- Sequence.cs
- PackWebRequestFactory.cs
- NameScopePropertyAttribute.cs
- HandleCollector.cs
- SqlReorderer.cs
- CodeTypeReference.cs
- LifetimeServices.cs
- FocusChangedEventArgs.cs
- EntityDataSourceReferenceGroup.cs
- Point3DAnimationUsingKeyFrames.cs
- PrimitiveType.cs
- FontFamily.cs
- UrlAuthorizationModule.cs
- SetterBaseCollection.cs
- UnionCodeGroup.cs
- HMACRIPEMD160.cs
- PassportPrincipal.cs
- IsolatedStorageException.cs
- WorkflowFormatterBehavior.cs
- RegexBoyerMoore.cs
- SetMemberBinder.cs
- CodeLinePragma.cs
- ToolStripSystemRenderer.cs
- ProcessHost.cs
- OperationInfoBase.cs
- ClickablePoint.cs
- InvalidFilterCriteriaException.cs
- SoapCodeExporter.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- ManagementClass.cs
- CompilerError.cs
- AuthenticationException.cs
- ProviderMetadataCachedInformation.cs
- SiteMapPath.cs
- InputLanguageSource.cs
- DataGridViewRowPostPaintEventArgs.cs
- AnimationClockResource.cs
- WebPartConnectionsCancelEventArgs.cs
- Membership.cs
- FormCollection.cs
- Stack.cs
- XmlSchemaValidator.cs
- MachineKeySection.cs
- WebBrowser.cs
- DatagridviewDisplayedBandsData.cs
- DebugHandleTracker.cs
- MenuDesigner.cs
- RoutedEventArgs.cs
- GenericIdentity.cs
- DependencyPropertyKind.cs
- QueryExtender.cs
- XmlSchemaIdentityConstraint.cs
- BCLDebug.cs
- XmlnsDictionary.cs
- TextEditorMouse.cs
- QueryResult.cs
- WebControl.cs
- ReflectionUtil.cs
- UnsafeNativeMethods.cs