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
- BaseResourcesBuildProvider.cs
- ConnectivityStatus.cs
- EventLogPermission.cs
- QueryOpcode.cs
- XmlChildEnumerator.cs
- DataGridViewCellStyle.cs
- X509ChainPolicy.cs
- ComProxy.cs
- SemanticResolver.cs
- EtwTrackingParticipant.cs
- DependencyPropertyConverter.cs
- CodeAttributeArgument.cs
- FileCodeGroup.cs
- FixedPageStructure.cs
- DotNetATv1WindowsLogEntryDeserializer.cs
- ToolBarButton.cs
- HMACSHA384.cs
- TextTreePropertyUndoUnit.cs
- HttpVersion.cs
- SqlBinder.cs
- IsolatedStorageFilePermission.cs
- FacetValues.cs
- ScrollBarRenderer.cs
- wgx_sdk_version.cs
- TransactionalPackage.cs
- AssemblyCollection.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- PolicyStatement.cs
- RunClient.cs
- XPathPatternBuilder.cs
- CommandID.cs
- AQNBuilder.cs
- SpellCheck.cs
- LicenseProviderAttribute.cs
- ViewgenGatekeeper.cs
- ChineseLunisolarCalendar.cs
- ObjectCacheHost.cs
- CookielessHelper.cs
- Int32RectValueSerializer.cs
- ProjectionCamera.cs
- objectquery_tresulttype.cs
- BaseParagraph.cs
- MgmtConfigurationRecord.cs
- DataRelationCollection.cs
- followingquery.cs
- ElementNotEnabledException.cs
- MenuItemAutomationPeer.cs
- SqlPersistenceWorkflowInstanceDescription.cs
- CalendarAutoFormatDialog.cs
- DataList.cs
- NotifyInputEventArgs.cs
- ButtonChrome.cs
- AppDomainShutdownMonitor.cs
- BitmapCacheBrush.cs
- Matrix3DValueSerializer.cs
- IOException.cs
- NativeMethods.cs
- QueryPageSettingsEventArgs.cs
- WeakEventTable.cs
- TypeUsage.cs
- ClickablePoint.cs
- ValueType.cs
- KeyTimeConverter.cs
- XhtmlBasicTextBoxAdapter.cs
- SQLDateTimeStorage.cs
- PersianCalendar.cs
- UTF8Encoding.cs
- HtmlControl.cs
- IdentitySection.cs
- AvTraceFormat.cs
- StylusCollection.cs
- InstanceData.cs
- WSSecurityTokenSerializer.cs
- DesignerAutoFormat.cs
- GetLedgerRequest.cs
- BoundPropertyEntry.cs
- Effect.cs
- BaseAddressPrefixFilterElement.cs
- JulianCalendar.cs
- JsonReaderWriterFactory.cs
- StylusPointProperties.cs
- TypeSystemHelpers.cs
- PersonalizableAttribute.cs
- MarkupExtensionReturnTypeAttribute.cs
- IfJoinedCondition.cs
- ReadOnlyCollection.cs
- TrackingServices.cs
- BlockUIContainer.cs
- JsonFormatReaderGenerator.cs
- QuaternionKeyFrameCollection.cs
- Emitter.cs
- Maps.cs
- XamlSerializerUtil.cs
- GroupItemAutomationPeer.cs
- XmlSchemaSimpleTypeRestriction.cs
- Point3DAnimationBase.cs
- AuditLogLocation.cs
- EditorZoneDesigner.cs
- AudioLevelUpdatedEventArgs.cs
- EngineSiteSapi.cs