Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / System / Windows / StylusOverProperty.cs / 1 / StylusOverProperty.cs
using System; using System.Windows.Input; using MS.Internal.KnownBoxes; namespace System.Windows { ///////////////////////////////////////////////////////////////////////// internal class StylusOverProperty : ReverseInheritProperty { ///////////////////////////////////////////////////////////////////// internal StylusOverProperty() : base( UIElement.IsStylusOverPropertyKey, CoreFlags.IsStylusOverCache, CoreFlags.IsStylusOverChanged) { } ///////////////////////////////////////////////////////////////////// internal override void FireNotifications(UIElement uie, ContentElement ce, UIElement3D uie3D, bool oldValue) { // This is all very sketchy... // // Tablet can support multiple stylus devices concurrently. They can each // be over a different element. They all update the IsStylusOver property, // which calls into here, but ends up using the "current" stylus device, // instead of each using their own device. Worse, all of these will end up // writing to the same bits in the UIElement. They are going to step all over // each other. if(Stylus.CurrentStylusDevice == null) { return; } StylusEventArgs stylusEventArgs = new StylusEventArgs(Stylus.CurrentStylusDevice, Environment.TickCount); stylusEventArgs.RoutedEvent = oldValue ? Stylus.StylusLeaveEvent : Stylus.StylusEnterEvent; if (uie != null) { uie.RaiseEvent(stylusEventArgs); } else if (ce != null) { ce.RaiseEvent(stylusEventArgs); } else if (uie3D != null) { uie3D.RaiseEvent(stylusEventArgs); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.Windows.Input; using MS.Internal.KnownBoxes; namespace System.Windows { ///////////////////////////////////////////////////////////////////////// internal class StylusOverProperty : ReverseInheritProperty { ///////////////////////////////////////////////////////////////////// internal StylusOverProperty() : base( UIElement.IsStylusOverPropertyKey, CoreFlags.IsStylusOverCache, CoreFlags.IsStylusOverChanged) { } ///////////////////////////////////////////////////////////////////// internal override void FireNotifications(UIElement uie, ContentElement ce, UIElement3D uie3D, bool oldValue) { // This is all very sketchy... // // Tablet can support multiple stylus devices concurrently. They can each // be over a different element. They all update the IsStylusOver property, // which calls into here, but ends up using the "current" stylus device, // instead of each using their own device. Worse, all of these will end up // writing to the same bits in the UIElement. They are going to step all over // each other. if(Stylus.CurrentStylusDevice == null) { return; } StylusEventArgs stylusEventArgs = new StylusEventArgs(Stylus.CurrentStylusDevice, Environment.TickCount); stylusEventArgs.RoutedEvent = oldValue ? Stylus.StylusLeaveEvent : Stylus.StylusEnterEvent; if (uie != null) { uie.RaiseEvent(stylusEventArgs); } else if (ce != null) { ce.RaiseEvent(stylusEventArgs); } else if (uie3D != null) { uie3D.RaiseEvent(stylusEventArgs); } } } } // 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
- KoreanCalendar.cs
- RtfControls.cs
- ImageButton.cs
- IDispatchConstantAttribute.cs
- CrossSiteScriptingValidation.cs
- XNameTypeConverter.cs
- RequestQueryParser.cs
- CompatibleIComparer.cs
- DbProviderConfigurationHandler.cs
- XmlMapping.cs
- RangeBase.cs
- CodeNamespaceCollection.cs
- ToolStripItemRenderEventArgs.cs
- ScriptIgnoreAttribute.cs
- StylusPlugInCollection.cs
- InteropBitmapSource.cs
- DataSourceHelper.cs
- DataGridState.cs
- VerificationException.cs
- ScriptModule.cs
- DataGridViewCellParsingEventArgs.cs
- RegexMatchCollection.cs
- SqlPersonalizationProvider.cs
- EnvelopedPkcs7.cs
- CompositeFontFamily.cs
- Thread.cs
- Script.cs
- XmlDownloadManager.cs
- SQLRoleProvider.cs
- DataGridViewColumnCollection.cs
- PostBackTrigger.cs
- ComPlusTraceRecord.cs
- DataGridViewTextBoxColumn.cs
- SafeNativeMethods.cs
- ModelFunction.cs
- TableRow.cs
- RequestDescription.cs
- RenderDataDrawingContext.cs
- OperationPerformanceCounters.cs
- SaveRecipientRequest.cs
- ReadOnlyTernaryTree.cs
- SharingService.cs
- DataGridViewColumnConverter.cs
- DispatcherTimer.cs
- XmlNodeComparer.cs
- BasicExpressionVisitor.cs
- ColorAnimationUsingKeyFrames.cs
- ByteStorage.cs
- RMPermissions.cs
- DataObject.cs
- WebPartHeaderCloseVerb.cs
- TableAdapterManagerMethodGenerator.cs
- NavigationPropertySingletonExpression.cs
- BooleanKeyFrameCollection.cs
- ScriptRegistrationManager.cs
- UpdatePanelControlTrigger.cs
- XmlnsDictionary.cs
- FormViewUpdateEventArgs.cs
- ErrorActivity.cs
- IsolatedStorageFilePermission.cs
- DataSvcMapFile.cs
- httpserverutility.cs
- XmlStreamStore.cs
- AuthenticationConfig.cs
- PerformanceCounterPermissionAttribute.cs
- TimelineClockCollection.cs
- SecurityContext.cs
- RtType.cs
- CompositeDesignerAccessibleObject.cs
- XmlConverter.cs
- ThaiBuddhistCalendar.cs
- DelayedRegex.cs
- OdbcPermission.cs
- InvalidProgramException.cs
- InterleavedZipPartStream.cs
- ChangeNode.cs
- HtmlValidationSummaryAdapter.cs
- ClientConvert.cs
- PageAdapter.cs
- ConfigXmlCDataSection.cs
- AssociationTypeEmitter.cs
- GridItem.cs
- RewritingProcessor.cs
- MsmqHostedTransportConfiguration.cs
- AppSettingsExpressionBuilder.cs
- PointHitTestParameters.cs
- MarkerProperties.cs
- WinEventHandler.cs
- XPathChildIterator.cs
- RecognizerBase.cs
- PersonalizationProviderCollection.cs
- RegionData.cs
- WinInetCache.cs
- TdsParserHelperClasses.cs
- SimplePropertyEntry.cs
- KeyValueConfigurationCollection.cs
- Point3D.cs
- AsymmetricKeyExchangeDeformatter.cs
- TablePattern.cs
- ArgumentOutOfRangeException.cs