Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- NumericExpr.cs
- XmlWriterDelegator.cs
- ItemList.cs
- WCFModelStrings.Designer.cs
- SiteMapDataSourceView.cs
- OleDragDropHandler.cs
- CodeGen.cs
- NamespaceList.cs
- FontFamily.cs
- HashMembershipCondition.cs
- SqlNodeTypeOperators.cs
- ImageMapEventArgs.cs
- SimpleHandlerFactory.cs
- SatelliteContractVersionAttribute.cs
- EntityCommand.cs
- Metadata.cs
- PrintDocument.cs
- TypeExtension.cs
- RoleManagerEventArgs.cs
- FormatSettings.cs
- infer.cs
- MarkupObject.cs
- RouteTable.cs
- ConnectionsZoneAutoFormat.cs
- ContextMenuAutomationPeer.cs
- DeviceContext.cs
- AttributeParameterInfo.cs
- AnnotationAuthorChangedEventArgs.cs
- WsatTransactionFormatter.cs
- MenuCommands.cs
- FixedSchema.cs
- AnnotationMap.cs
- ComplexTypeEmitter.cs
- PerformanceCounterPermissionEntry.cs
- ToolStripContainer.cs
- Setter.cs
- StickyNoteAnnotations.cs
- RoleManagerSection.cs
- XamlHostingConfiguration.cs
- XmlFormatExtensionPointAttribute.cs
- FieldNameLookup.cs
- PeerNameRecordCollection.cs
- XmlUtil.cs
- Stylesheet.cs
- HtmlElementEventArgs.cs
- OperationDescription.cs
- WorkflowServiceHostFactory.cs
- AsyncResult.cs
- InstanceLockQueryResult.cs
- _WinHttpWebProxyDataBuilder.cs
- DataError.cs
- _SslStream.cs
- UserControlParser.cs
- bidPrivateBase.cs
- ToolStripDropTargetManager.cs
- PrivilegedConfigurationManager.cs
- ClientConfigPaths.cs
- SelectQueryOperator.cs
- XmlCompatibilityReader.cs
- JpegBitmapDecoder.cs
- WindowsListBox.cs
- XmlSchemaInclude.cs
- CodePropertyReferenceExpression.cs
- CultureMapper.cs
- Baml2006ReaderFrame.cs
- PartialCachingControl.cs
- DataGridItemCollection.cs
- ControlParameter.cs
- SystemMulticastIPAddressInformation.cs
- ReachPageContentSerializer.cs
- EditingCoordinator.cs
- WebPartConnectionsCancelVerb.cs
- PlanCompilerUtil.cs
- Security.cs
- SpeechRecognizer.cs
- HttpListenerPrefixCollection.cs
- RowBinding.cs
- HierarchicalDataSourceDesigner.cs
- HttpSysSettings.cs
- MatrixValueSerializer.cs
- IndexingContentUnit.cs
- EntityContainerEmitter.cs
- StdValidatorsAndConverters.cs
- XmlWriterSettings.cs
- RegexMatchCollection.cs
- WindowsFormsSectionHandler.cs
- DeferredTextReference.cs
- Rotation3DAnimationBase.cs
- Int16Animation.cs
- TypeBuilder.cs
- ComboBox.cs
- sqlstateclientmanager.cs
- AtomMaterializerLog.cs
- TypeExtensionConverter.cs
- QilBinary.cs
- ContentFilePart.cs
- StrongNamePublicKeyBlob.cs
- XmlChildNodes.cs
- PolyBezierSegment.cs
- DataBoundControl.cs