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
- UserControl.cs
- TCEAdapterGenerator.cs
- Pens.cs
- PartialTrustVisibleAssemblyCollection.cs
- Lookup.cs
- MetadataPropertyvalue.cs
- WSFederationHttpBindingCollectionElement.cs
- EnvironmentPermission.cs
- DataPager.cs
- WebCategoryAttribute.cs
- Internal.cs
- EntitySet.cs
- HttpContext.cs
- HasCopySemanticsAttribute.cs
- ForEachDesigner.xaml.cs
- TabletDeviceInfo.cs
- Stack.cs
- AnnotationObservableCollection.cs
- Margins.cs
- QuaternionRotation3D.cs
- ExpressionParser.cs
- ControlBuilderAttribute.cs
- User.cs
- ArraySegment.cs
- DesignTimeParseData.cs
- ParameterRetriever.cs
- ServiceBehaviorAttribute.cs
- ProviderMetadata.cs
- FrameworkElement.cs
- RuleSettingsCollection.cs
- ExpressionBindings.cs
- CopyAction.cs
- RadioButtonFlatAdapter.cs
- HttpModuleActionCollection.cs
- Matrix.cs
- RawKeyboardInputReport.cs
- ConfigurationManagerHelper.cs
- TabPage.cs
- DomainUpDown.cs
- DataGridCaption.cs
- RoutedEventValueSerializer.cs
- AssociationTypeEmitter.cs
- ModifierKeysConverter.cs
- _NtlmClient.cs
- SHA256.cs
- RegexWorker.cs
- FontWeights.cs
- Monitor.cs
- WebPartVerbCollection.cs
- DocumentGridContextMenu.cs
- SimpleMailWebEventProvider.cs
- TdsEnums.cs
- ValueType.cs
- DataContext.cs
- PixelFormatConverter.cs
- FormatConvertedBitmap.cs
- SiteOfOriginPart.cs
- InputQueueChannelAcceptor.cs
- login.cs
- TemplateParser.cs
- ThreadLocal.cs
- ManifestResourceInfo.cs
- ScriptControlManager.cs
- RSACryptoServiceProvider.cs
- PageOutputColor.cs
- MimePart.cs
- RoutedEventArgs.cs
- Property.cs
- ComboBox.cs
- MenuAdapter.cs
- rsa.cs
- FusionWrap.cs
- PenLineCapValidation.cs
- UTF32Encoding.cs
- PropertyValueChangedEvent.cs
- DeferredReference.cs
- ComboBox.cs
- ValidationVisibilityAttribute.cs
- OleDbDataAdapter.cs
- processwaithandle.cs
- QueryInterceptorAttribute.cs
- PngBitmapDecoder.cs
- ITreeGenerator.cs
- DataRowComparer.cs
- NamedPipeConnectionPoolSettings.cs
- ProfileEventArgs.cs
- TransformDescriptor.cs
- FileResponseElement.cs
- GC.cs
- ProbeMatches11.cs
- UnsafeNativeMethods.cs
- ValidatorUtils.cs
- Compiler.cs
- XmlSchemaChoice.cs
- CustomAttributeBuilder.cs
- PageHandlerFactory.cs
- ChtmlTextWriter.cs
- Stack.cs
- DataSourceView.cs
- __Filters.cs