Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- CompiledAction.cs
- DataServiceSaveChangesEventArgs.cs
- SingleKeyFrameCollection.cs
- CodeTypeParameterCollection.cs
- VectorConverter.cs
- Soap12FormatExtensions.cs
- DoubleLinkList.cs
- CodeTypeMemberCollection.cs
- SaveFileDialog.cs
- FamilyCollection.cs
- Object.cs
- HttpWebRequest.cs
- StringUtil.cs
- BaseProcessor.cs
- RefreshEventArgs.cs
- _RequestCacheProtocol.cs
- TextElementCollectionHelper.cs
- PrintPreviewControl.cs
- VirtualizedItemPattern.cs
- ConfigXmlCDataSection.cs
- RegistryKey.cs
- FloaterBaseParaClient.cs
- FlowDocumentScrollViewer.cs
- MulticastIPAddressInformationCollection.cs
- EmptyQuery.cs
- DictionaryBase.cs
- SoapUnknownHeader.cs
- base64Transforms.cs
- Brushes.cs
- FormViewCommandEventArgs.cs
- PathGeometry.cs
- ReadOnlyDictionary.cs
- WebPartUtil.cs
- EventRoute.cs
- FixUp.cs
- ListViewItemCollectionEditor.cs
- EntityContainerAssociationSet.cs
- TreeNodeStyle.cs
- WebServiceTypeData.cs
- DesignerActionUIService.cs
- HtmlSelect.cs
- DbModificationCommandTree.cs
- TableChangeProcessor.cs
- RegionInfo.cs
- CaseInsensitiveOrdinalStringComparer.cs
- TextTrailingWordEllipsis.cs
- DataRecord.cs
- CustomValidator.cs
- PerformanceCounterLib.cs
- RelationshipType.cs
- ActivationArguments.cs
- ProfileInfo.cs
- Debug.cs
- AutomationProperties.cs
- RegexCompiler.cs
- CommandField.cs
- AttributeAction.cs
- DesignBindingEditor.cs
- ConsoleCancelEventArgs.cs
- QueryableFilterUserControl.cs
- WebPartDisplayModeEventArgs.cs
- PresentationSource.cs
- ColumnResizeUndoUnit.cs
- TokenizerHelper.cs
- DoubleAnimationUsingPath.cs
- DrawingGroupDrawingContext.cs
- SystemIcmpV4Statistics.cs
- PropertyIDSet.cs
- TextRenderer.cs
- NavigatorOutput.cs
- PageCanvasSize.cs
- MenuAdapter.cs
- CompositeActivityValidator.cs
- MeasurementDCInfo.cs
- ValidationHelper.cs
- EntityTypeEmitter.cs
- InstancePersistenceException.cs
- MimeTypeAttribute.cs
- RegexGroup.cs
- VisualStateGroup.cs
- MetadataArtifactLoaderCompositeResource.cs
- _SecureChannel.cs
- TextBox.cs
- BaseCodePageEncoding.cs
- ColorTransformHelper.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- PageEventArgs.cs
- CookieProtection.cs
- Container.cs
- Tokenizer.cs
- ClientBuildManager.cs
- Canvas.cs
- SystemThemeKey.cs
- StringExpressionSet.cs
- DataSourceSerializationException.cs
- IntegrationExceptionEventArgs.cs
- ManagementBaseObject.cs
- PrtTicket_Public_Simple.cs
- VariableExpressionConverter.cs
- PolicyDesigner.cs