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
- SHA256Cng.cs
- ListControlConvertEventArgs.cs
- BidOverLoads.cs
- KeyedQueue.cs
- EffectiveValueEntry.cs
- StateChangeEvent.cs
- CalendarData.cs
- _NegoState.cs
- EventlogProvider.cs
- DataViewManagerListItemTypeDescriptor.cs
- EtwTrace.cs
- ProxyManager.cs
- DesignerActionList.cs
- XmlBindingWorker.cs
- MimeTextImporter.cs
- AsymmetricSecurityBindingElement.cs
- PrinterUnitConvert.cs
- ImpersonateTokenRef.cs
- OutputCacheSettingsSection.cs
- ToolStripSystemRenderer.cs
- DataViewManagerListItemTypeDescriptor.cs
- LexicalChunk.cs
- PropertyTabAttribute.cs
- SafeArrayTypeMismatchException.cs
- StateMachine.cs
- SharedTcpTransportManager.cs
- WSSecureConversation.cs
- SyndicationDeserializer.cs
- SelectQueryOperator.cs
- ListBindingConverter.cs
- OrderByLifter.cs
- DefaultDiscoveryServiceExtension.cs
- RegexWriter.cs
- StrongNameMembershipCondition.cs
- DataBindingHandlerAttribute.cs
- SendSecurityHeader.cs
- IriParsingElement.cs
- DbExpressionVisitor.cs
- TimeSpanStorage.cs
- TaskFileService.cs
- ConnectionPointGlyph.cs
- OpCellTreeNode.cs
- LineMetrics.cs
- sqlmetadatafactory.cs
- UmAlQuraCalendar.cs
- DataSourceControl.cs
- ContextCorrelationInitializer.cs
- MessageQueue.cs
- KeyProperty.cs
- diagnosticsswitches.cs
- Documentation.cs
- ColorAnimation.cs
- VersionedStreamOwner.cs
- TaskDesigner.cs
- GeneralTransformGroup.cs
- ClipboardProcessor.cs
- SizeFConverter.cs
- sqlstateclientmanager.cs
- AxHost.cs
- InProcStateClientManager.cs
- BlobPersonalizationState.cs
- InputReportEventArgs.cs
- TextServicesCompartmentEventSink.cs
- XmlSchemas.cs
- XmlSchemaComplexType.cs
- TreeViewEvent.cs
- NumberFunctions.cs
- ArrayTypeMismatchException.cs
- SemanticBasicElement.cs
- ViewSimplifier.cs
- BufferedReadStream.cs
- StaticExtensionConverter.cs
- WebPartHelpVerb.cs
- Command.cs
- SafeMemoryMappedViewHandle.cs
- ExpandCollapseProviderWrapper.cs
- Scanner.cs
- AccessDataSource.cs
- Events.cs
- keycontainerpermission.cs
- TrackBar.cs
- ProviderConnectionPoint.cs
- SByteConverter.cs
- SqlParameterizer.cs
- ExtentKey.cs
- MenuItem.cs
- FileEnumerator.cs
- MenuItemBinding.cs
- SpellerInterop.cs
- GrammarBuilderWildcard.cs
- FieldMetadata.cs
- XmlAttributeCollection.cs
- SemaphoreFullException.cs
- ObjectAssociationEndMapping.cs
- TextDecoration.cs
- SafeEventLogWriteHandle.cs
- DataObjectEventArgs.cs
- BStrWrapper.cs
- XmlTextReaderImplHelpers.cs
- CoreSwitches.cs