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
- PointLightBase.cs
- StylusPointPropertyInfo.cs
- TextTreePropertyUndoUnit.cs
- ProcessManager.cs
- RepeaterCommandEventArgs.cs
- SqlConnectionHelper.cs
- OleDbRowUpdatedEvent.cs
- ScrollBar.cs
- OleDbParameter.cs
- TrustManagerPromptUI.cs
- WindowsIdentity.cs
- ImageListStreamer.cs
- FormCollection.cs
- CompoundFileReference.cs
- BStrWrapper.cs
- GiveFeedbackEvent.cs
- SortDescription.cs
- UserNameSecurityToken.cs
- TransactionInterop.cs
- ClientSettingsProvider.cs
- NativeCppClassAttribute.cs
- CqlErrorHelper.cs
- InstanceDescriptor.cs
- CharAnimationBase.cs
- TextBoxBase.cs
- ObjectViewQueryResultData.cs
- GrammarBuilderRuleRef.cs
- ClientSettingsSection.cs
- FragmentQueryProcessor.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- BindingListCollectionView.cs
- SynchronizationContext.cs
- ContentOperations.cs
- LambdaReference.cs
- XmlSerializableServices.cs
- TextDecorationCollection.cs
- ExceptionHandlers.cs
- BigInt.cs
- PresentationSource.cs
- SqlXml.cs
- AppDomainAttributes.cs
- ConfigurationManager.cs
- InputReportEventArgs.cs
- ExtensionFile.cs
- KeyValuePair.cs
- Select.cs
- HierarchicalDataSourceIDConverter.cs
- GacUtil.cs
- CommonProperties.cs
- TaskFileService.cs
- OracleBoolean.cs
- AllMembershipCondition.cs
- StreamReader.cs
- ContextMenu.cs
- OleDbError.cs
- PrimaryKeyTypeConverter.cs
- ContextItemManager.cs
- PartialTrustVisibleAssembliesSection.cs
- StagingAreaInputItem.cs
- CheckPair.cs
- DataBoundControlHelper.cs
- FilterQuery.cs
- Line.cs
- SamlDoNotCacheCondition.cs
- XmlHierarchyData.cs
- WebPartConnectionsConnectVerb.cs
- DataListItem.cs
- SettingsAttributes.cs
- DataSourceControl.cs
- BoundPropertyEntry.cs
- DataGridDetailsPresenterAutomationPeer.cs
- StringUtil.cs
- SimpleMailWebEventProvider.cs
- DispatcherOperation.cs
- RowBinding.cs
- RecordsAffectedEventArgs.cs
- TemplateParser.cs
- _StreamFramer.cs
- DataGridViewRowCollection.cs
- SoapTypeAttribute.cs
- PropertyValueChangedEvent.cs
- OleCmdHelper.cs
- WebPartsPersonalizationAuthorization.cs
- TimelineGroup.cs
- DeflateInput.cs
- XmlTypeAttribute.cs
- GenericPrincipal.cs
- ConvertTextFrag.cs
- SerializationAttributes.cs
- ToolStripSettings.cs
- LinqDataSourceHelper.cs
- StrongTypingException.cs
- GeometryGroup.cs
- ContentOperations.cs
- SqlParameter.cs
- ConfigXmlText.cs
- SafeReversePInvokeHandle.cs
- TypefaceCollection.cs
- LayoutExceptionEventArgs.cs
- HebrewCalendar.cs