Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / StylusOverProperty.cs / 1305600 / 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
- MdiWindowListItemConverter.cs
- DebuggerAttributes.cs
- HandledMouseEvent.cs
- EditorPartChrome.cs
- DeclarativeCatalogPart.cs
- ObjectQuery_EntitySqlExtensions.cs
- GPStream.cs
- TableLayoutRowStyleCollection.cs
- TextBounds.cs
- LateBoundBitmapDecoder.cs
- DetailsViewInsertedEventArgs.cs
- Soap.cs
- HttpListenerException.cs
- XmlNamespaceDeclarationsAttribute.cs
- RoutedPropertyChangedEventArgs.cs
- QueryableDataSource.cs
- ListBase.cs
- RequiredFieldValidator.cs
- AndCondition.cs
- PageClientProxyGenerator.cs
- ScrollPattern.cs
- IndexedSelectQueryOperator.cs
- PathTooLongException.cs
- ListBoxItemAutomationPeer.cs
- DESCryptoServiceProvider.cs
- MessageBox.cs
- AutomationEvent.cs
- ConfigXmlSignificantWhitespace.cs
- Encoder.cs
- ProxyWebPart.cs
- DiscoveryRequestHandler.cs
- CodeDomLoader.cs
- _CookieModule.cs
- SmtpClient.cs
- SocketElement.cs
- ImageConverter.cs
- DesignerCategoryAttribute.cs
- AssemblyBuilderData.cs
- Socket.cs
- GridItemPattern.cs
- DefaultBinder.cs
- DbConvert.cs
- TypeReference.cs
- documentation.cs
- ListControlConvertEventArgs.cs
- SuppressMessageAttribute.cs
- Ticks.cs
- InheritedPropertyChangedEventArgs.cs
- HMACSHA256.cs
- FixedFlowMap.cs
- FixedPageStructure.cs
- ConnectionConsumerAttribute.cs
- ContainerUIElement3D.cs
- CutCopyPasteHelper.cs
- AppDomain.cs
- DetailsViewInsertEventArgs.cs
- FormsAuthenticationTicket.cs
- StateMachineHelpers.cs
- GACMembershipCondition.cs
- ValidatorCompatibilityHelper.cs
- RadioButtonBaseAdapter.cs
- XmlBaseWriter.cs
- RemoteWebConfigurationHostStream.cs
- DataGridViewControlCollection.cs
- PointCollection.cs
- XmlCharType.cs
- BindingsCollection.cs
- CheckedPointers.cs
- GeneralTransform2DTo3D.cs
- TextEditorDragDrop.cs
- TextContainerChangedEventArgs.cs
- SspiSafeHandles.cs
- HtmlTableRowCollection.cs
- Speller.cs
- DependencyPropertyChangedEventArgs.cs
- ListViewInsertedEventArgs.cs
- XamlSerializer.cs
- BitmapImage.cs
- ObjectManager.cs
- HttpCookiesSection.cs
- SqlBooleanMismatchVisitor.cs
- CodeCatchClauseCollection.cs
- BinarySecretKeyIdentifierClause.cs
- PackageDigitalSignatureManager.cs
- UndoEngine.cs
- ChineseLunisolarCalendar.cs
- WorkflowMarkupSerializationProvider.cs
- ForEach.cs
- ItemContainerGenerator.cs
- WorkerRequest.cs
- DocumentViewer.cs
- SemaphoreSecurity.cs
- DurationConverter.cs
- TrustManager.cs
- PipelineModuleStepContainer.cs
- SiteMapSection.cs
- TextAutomationPeer.cs
- EncryptedPackage.cs
- ComponentChangingEvent.cs
- ArrayConverter.cs