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
- LinqDataSource.cs
- DataStreamFromComStream.cs
- ThaiBuddhistCalendar.cs
- AspNetCompatibilityRequirementsAttribute.cs
- StreamResourceInfo.cs
- ItemCheckEvent.cs
- TemplateField.cs
- InputBinder.cs
- DbMetaDataFactory.cs
- SqlProcedureAttribute.cs
- SqlBulkCopy.cs
- RuntimeArgumentHandle.cs
- Clause.cs
- IteratorDescriptor.cs
- Baml2006KeyRecord.cs
- SourceChangedEventArgs.cs
- ScopelessEnumAttribute.cs
- ErrorHandlerModule.cs
- MarkupCompilePass1.cs
- NamespaceDecl.cs
- DateTimeParse.cs
- ScrollableControl.cs
- CodeSnippetExpression.cs
- LineMetrics.cs
- Point3DAnimationBase.cs
- SqlErrorCollection.cs
- StrokeFIndices.cs
- SecurityException.cs
- SubordinateTransaction.cs
- TrackingMemoryStreamFactory.cs
- PeerDuplexChannelListener.cs
- MsmqIntegrationSecurityMode.cs
- GuidelineCollection.cs
- HtmlControl.cs
- Material.cs
- Util.cs
- OracleInternalConnection.cs
- BindingsCollection.cs
- ConfigurationValues.cs
- DynamicContractTypeBuilder.cs
- FrameworkElementAutomationPeer.cs
- ValidationUtility.cs
- InternalControlCollection.cs
- LinearKeyFrames.cs
- Sentence.cs
- XmlSchemaParticle.cs
- XmlTextReaderImpl.cs
- ClipboardProcessor.cs
- ComMethodElement.cs
- MissingFieldException.cs
- ProfileSection.cs
- DataGridViewButtonCell.cs
- StaticDataManager.cs
- WebCodeGenerator.cs
- WindowAutomationPeer.cs
- ColorConvertedBitmapExtension.cs
- FlowLayoutSettings.cs
- XmlDataSourceView.cs
- PointAnimationUsingKeyFrames.cs
- IdentityManager.cs
- XMLDiffLoader.cs
- AssemblyAttributesGoHere.cs
- X509Certificate.cs
- HtmlTableCell.cs
- NotifyParentPropertyAttribute.cs
- ArgumentException.cs
- ColumnMapVisitor.cs
- EventSinkHelperWriter.cs
- DataListCommandEventArgs.cs
- TypeConverterHelper.cs
- DataTableCollection.cs
- SimpleHandlerBuildProvider.cs
- PersistenceProviderDirectory.cs
- OutputCacheSettingsSection.cs
- SynchronizedDispatch.cs
- IntegerFacetDescriptionElement.cs
- RefType.cs
- WorkflowServiceHost.cs
- RootBrowserWindowProxy.cs
- TypeNameConverter.cs
- FileAuthorizationModule.cs
- QueueProcessor.cs
- ResourceReferenceKeyNotFoundException.cs
- TextAnchor.cs
- RawStylusSystemGestureInputReport.cs
- HttpListenerContext.cs
- MailSettingsSection.cs
- QueryContinueDragEventArgs.cs
- AttributeCollection.cs
- ExpressionEditorAttribute.cs
- ToolStripContextMenu.cs
- MonthChangedEventArgs.cs
- SafeNativeMethods.cs
- AuthenticationModuleElementCollection.cs
- URLString.cs
- FormsAuthenticationUserCollection.cs
- GeneralTransformGroup.cs
- InvalidPropValue.cs
- DataGridViewColumnEventArgs.cs
- SQLSingle.cs