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
- AtomServiceDocumentSerializer.cs
- AuthorizationSection.cs
- LocationUpdates.cs
- WebHttpSecurityModeHelper.cs
- Message.cs
- MemberPathMap.cs
- SymbolTable.cs
- TrustManagerPromptUI.cs
- HtmlControl.cs
- RadioButton.cs
- _SslStream.cs
- SqlServices.cs
- LocationSectionRecord.cs
- ContentFilePart.cs
- SByte.cs
- CodeDOMUtility.cs
- AnonymousIdentificationSection.cs
- HttpConfigurationSystem.cs
- ToolStripDropDownItemDesigner.cs
- InvokeDelegate.cs
- SignedXml.cs
- HitTestWithGeometryDrawingContextWalker.cs
- CompressEmulationStream.cs
- Durable.cs
- XmlResolver.cs
- FixedSOMTable.cs
- ConfigurationPermission.cs
- SmtpClient.cs
- NavigationPropertyEmitter.cs
- EntityUtil.cs
- StylusPointDescription.cs
- PropertyKey.cs
- LabelEditEvent.cs
- Native.cs
- OptionUsage.cs
- ExceptionValidationRule.cs
- ListItemConverter.cs
- FileController.cs
- xmlformatgeneratorstatics.cs
- DataGridRelationshipRow.cs
- XmlSchemaSimpleTypeUnion.cs
- ObjectDataSourceWizardForm.cs
- DesignerActionItem.cs
- FontUnit.cs
- ServiceNameElement.cs
- TerminatingOperationBehavior.cs
- XmlSerializerFactory.cs
- TransformProviderWrapper.cs
- XmlRawWriterWrapper.cs
- OdbcConnectionString.cs
- CompilerGeneratedAttribute.cs
- UnmanagedHandle.cs
- ScriptControl.cs
- DetailsViewDeleteEventArgs.cs
- GrabHandleGlyph.cs
- RepeaterCommandEventArgs.cs
- ApplicationTrust.cs
- ToggleButtonAutomationPeer.cs
- KeyedHashAlgorithm.cs
- FixedPage.cs
- SoapExtension.cs
- WebBrowser.cs
- Thumb.cs
- MetadataPropertyvalue.cs
- ConfigXmlElement.cs
- CapabilitiesAssignment.cs
- WsatExtendedInformation.cs
- DesigntimeLicenseContext.cs
- TrackBarRenderer.cs
- GeneralTransform.cs
- UniqueIdentifierService.cs
- PermissionToken.cs
- XmlElement.cs
- ErrorFormatterPage.cs
- CodeTypeMemberCollection.cs
- EditorPartCollection.cs
- UTF32Encoding.cs
- DataGridCell.cs
- XmlNamespaceManager.cs
- SqlDataSourceCommandParser.cs
- Privilege.cs
- PropertySegmentSerializationProvider.cs
- KeySpline.cs
- CompensatableTransactionScopeActivity.cs
- ComplexPropertyEntry.cs
- BaseTemplatedMobileComponentEditor.cs
- TextOptions.cs
- URI.cs
- CodeMethodReturnStatement.cs
- DecimalStorage.cs
- DispatcherHooks.cs
- X509Extension.cs
- NavigateUrlConverter.cs
- FilterableAttribute.cs
- Property.cs
- ExecutionContext.cs
- DataBindingCollection.cs
- ContextQuery.cs
- ExceptionCollection.cs
- ScalarRestriction.cs