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
- ContentPlaceHolderDesigner.cs
- WinEventWrap.cs
- StorageMappingItemCollection.cs
- ProfileSettings.cs
- DesignerVerbCollection.cs
- HtmlInputPassword.cs
- HttpFileCollection.cs
- FileDataSourceCache.cs
- LazyInitializer.cs
- PixelFormats.cs
- ResourceDefaultValueAttribute.cs
- ScriptControlDescriptor.cs
- StrongNameHelpers.cs
- UrlPropertyAttribute.cs
- CodeNamespaceImport.cs
- ProtocolsSection.cs
- XslUrlEditor.cs
- XamlParser.cs
- MessageDispatch.cs
- WebZone.cs
- DotAtomReader.cs
- BitmapEffectGroup.cs
- ImageListStreamer.cs
- SharedPersonalizationStateInfo.cs
- MetadataException.cs
- PersonalizationStateQuery.cs
- HiddenFieldPageStatePersister.cs
- IndentedWriter.cs
- XhtmlTextWriter.cs
- CompilerTypeWithParams.cs
- BitConverter.cs
- DbParameterCollectionHelper.cs
- DefaultWorkflowTransactionService.cs
- MergeFilterQuery.cs
- Accessors.cs
- ExecutionEngineException.cs
- MenuItem.cs
- MinimizableAttributeTypeConverter.cs
- translator.cs
- Context.cs
- SelectionPattern.cs
- HtmlTextViewAdapter.cs
- Globals.cs
- GridViewDeleteEventArgs.cs
- DataGridViewRowCancelEventArgs.cs
- Currency.cs
- TraceHandler.cs
- Debug.cs
- COM2EnumConverter.cs
- SQLInt16.cs
- SqlBulkCopyColumnMapping.cs
- PrintingPermission.cs
- PackWebResponse.cs
- WebPartZoneCollection.cs
- ProfileParameter.cs
- InputBuffer.cs
- BmpBitmapEncoder.cs
- InheritanceAttribute.cs
- PrimitiveCodeDomSerializer.cs
- TraceSwitch.cs
- WebDescriptionAttribute.cs
- MailBnfHelper.cs
- GridLengthConverter.cs
- Timer.cs
- Popup.cs
- OleDbErrorCollection.cs
- WizardStepBase.cs
- ScaleTransform3D.cs
- AutoGeneratedField.cs
- HttpProfileGroupBase.cs
- RSAOAEPKeyExchangeDeformatter.cs
- OleDbTransaction.cs
- PointValueSerializer.cs
- Win32Native.cs
- XmlTypeMapping.cs
- CryptoSession.cs
- TableItemProviderWrapper.cs
- MappedMetaModel.cs
- pingexception.cs
- ShutDownListener.cs
- EventRoute.cs
- GridViewCancelEditEventArgs.cs
- Enlistment.cs
- SqlDataSourceSelectingEventArgs.cs
- ListParagraph.cs
- StatusBarItemAutomationPeer.cs
- GeneralTransform3DTo2DTo3D.cs
- NativeCompoundFileAPIs.cs
- BuildProvidersCompiler.cs
- RbTree.cs
- PerspectiveCamera.cs
- Visual3D.cs
- ResourceExpressionEditor.cs
- TailCallAnalyzer.cs
- AssociationSet.cs
- ButtonRenderer.cs
- SchemaEntity.cs
- AsyncOperationContext.cs
- Int32Rect.cs
- SoapSchemaExporter.cs