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
- ManipulationPivot.cs
- OracleLob.cs
- OperatingSystem.cs
- RootNamespaceAttribute.cs
- SpeechSynthesizer.cs
- ByteStack.cs
- OverflowException.cs
- CommentEmitter.cs
- SecurityPermission.cs
- DataGridViewHeaderCell.cs
- DataTemplateKey.cs
- EmbeddedMailObjectsCollection.cs
- PngBitmapDecoder.cs
- TextServicesCompartmentEventSink.cs
- BamlRecordWriter.cs
- IntSecurity.cs
- BufferModeSettings.cs
- IisNotInstalledException.cs
- SecurityPolicyVersion.cs
- EventLogTraceListener.cs
- EFDataModelProvider.cs
- BufferedReadStream.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- ToolTipAutomationPeer.cs
- Drawing.cs
- StatusBarPanel.cs
- CorrelationRequestContext.cs
- CornerRadiusConverter.cs
- DataStreamFromComStream.cs
- DataTableReader.cs
- VisualTreeUtils.cs
- DiagnosticTraceSchemas.cs
- FocusTracker.cs
- ConfigurationException.cs
- EntitySetBaseCollection.cs
- DataGridComponentEditor.cs
- BaseValidatorDesigner.cs
- DistinctQueryOperator.cs
- ArrayList.cs
- CodeTypeConstructor.cs
- ColorConvertedBitmap.cs
- RelationshipConstraintValidator.cs
- MultipartIdentifier.cs
- TemplateParser.cs
- DragDeltaEventArgs.cs
- WizardStepCollectionEditor.cs
- KoreanLunisolarCalendar.cs
- Paragraph.cs
- CounterSetInstance.cs
- UIElement.cs
- FrameworkName.cs
- PriorityBindingExpression.cs
- TableLayoutCellPaintEventArgs.cs
- FixedBufferAttribute.cs
- StringCollectionEditor.cs
- SqlDataSource.cs
- RoleManagerModule.cs
- XpsS0ValidatingLoader.cs
- SystemIPv4InterfaceProperties.cs
- ApplyTemplatesAction.cs
- ISCIIEncoding.cs
- DecimalAverageAggregationOperator.cs
- DockPattern.cs
- SuppressMessageAttribute.cs
- CqlLexerHelpers.cs
- TitleStyle.cs
- indexingfiltermarshaler.cs
- TypeToken.cs
- Renderer.cs
- OdbcDataReader.cs
- AdRotator.cs
- GiveFeedbackEvent.cs
- PropertyGeneratedEventArgs.cs
- OdbcConnection.cs
- TransactionsSectionGroup.cs
- EntityTypeBase.cs
- SelfIssuedSamlTokenFactory.cs
- Base64Encoding.cs
- OleDbError.cs
- TypeDependencyAttribute.cs
- HierarchicalDataTemplate.cs
- GlyphCache.cs
- AxHost.cs
- FlowDocumentPaginator.cs
- DnsPermission.cs
- StorageComplexPropertyMapping.cs
- NotifyIcon.cs
- ControlUtil.cs
- ColorConverter.cs
- GeneralTransform3DGroup.cs
- _SecureChannel.cs
- AnnotationObservableCollection.cs
- DataGridColumn.cs
- TraceHandler.cs
- FileDialog.cs
- TextViewBase.cs
- ArrayConverter.cs
- DynamicDocumentPaginator.cs
- ServerIdentity.cs
- TypeTypeConverter.cs