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
- WizardStepBase.cs
- DbInsertCommandTree.cs
- AlignmentYValidation.cs
- EnumerableRowCollectionExtensions.cs
- SettingsBase.cs
- TreeViewEvent.cs
- InkSerializer.cs
- TransformerTypeCollection.cs
- ApplicationFileCodeDomTreeGenerator.cs
- SafeJobHandle.cs
- ObjectDataProvider.cs
- CompilerCollection.cs
- XPathConvert.cs
- APCustomTypeDescriptor.cs
- OdbcDataAdapter.cs
- ProfileSection.cs
- CodeComment.cs
- Matrix.cs
- RegexStringValidatorAttribute.cs
- Attributes.cs
- EntityProviderServices.cs
- HwndHostAutomationPeer.cs
- ChangeNode.cs
- MediaSystem.cs
- Filter.cs
- DataGridViewCellLinkedList.cs
- Path.cs
- BlurBitmapEffect.cs
- ControlValuePropertyAttribute.cs
- BaseParser.cs
- DataControlField.cs
- WebConfigurationHostFileChange.cs
- WebPartTransformer.cs
- InfoCardRequestException.cs
- InlineCollection.cs
- EntityDataReader.cs
- EntityChangedParams.cs
- DesignerAutoFormatCollection.cs
- DesignerActionListCollection.cs
- TextSerializer.cs
- DataGridViewCellValueEventArgs.cs
- SQlBooleanStorage.cs
- TableProvider.cs
- ToolStripProgressBar.cs
- FontDriver.cs
- ConfigXmlSignificantWhitespace.cs
- IISUnsafeMethods.cs
- IfAction.cs
- SiteMapNodeItem.cs
- CollectionViewGroup.cs
- JumpList.cs
- AstTree.cs
- PartialToken.cs
- CopyNodeSetAction.cs
- BitmapEffectCollection.cs
- _NetRes.cs
- ConnectionInterfaceCollection.cs
- filewebresponse.cs
- SingleAnimation.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- TableCellCollection.cs
- MimeMultiPart.cs
- MissingSatelliteAssemblyException.cs
- MiniParameterInfo.cs
- DynamicControlParameter.cs
- WebFaultException.cs
- HandlerWithFactory.cs
- diagnosticsswitches.cs
- webeventbuffer.cs
- FontInfo.cs
- PrintDialog.cs
- InputEventArgs.cs
- WebServiceEnumData.cs
- DtrList.cs
- CodePrimitiveExpression.cs
- HttpContextServiceHost.cs
- IgnoreDataMemberAttribute.cs
- ResourceExpressionBuilder.cs
- CodeExpressionStatement.cs
- EventLogStatus.cs
- DateTimeConstantAttribute.cs
- TextDecorationCollection.cs
- TransactionProtocolConverter.cs
- InternalConfigConfigurationFactory.cs
- RepeatButtonAutomationPeer.cs
- HMACSHA256.cs
- selecteditemcollection.cs
- MetadataExchangeClient.cs
- SlipBehavior.cs
- Icon.cs
- CodeIndexerExpression.cs
- NameSpaceEvent.cs
- HScrollProperties.cs
- FillBehavior.cs
- PreviewPrintController.cs
- RpcResponse.cs
- WindowsToolbar.cs
- sortedlist.cs
- ScaleTransform3D.cs
- NullableFloatSumAggregationOperator.cs