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
- PopupControlService.cs
- FilterQuery.cs
- NativeBuffer.cs
- DataErrorValidationRule.cs
- CharacterString.cs
- SchemaElementLookUpTable.cs
- CommunicationException.cs
- StrongNameKeyPair.cs
- SystemUnicastIPAddressInformation.cs
- CodeSnippetCompileUnit.cs
- CompleteWizardStep.cs
- DecoratedNameAttribute.cs
- Condition.cs
- TerminateDesigner.cs
- InputChannelBinder.cs
- ComUdtElementCollection.cs
- SiteMapDataSourceView.cs
- FixedSOMTable.cs
- ComplexBindingPropertiesAttribute.cs
- ViewStateModeByIdAttribute.cs
- RemoteWebConfigurationHost.cs
- StylusOverProperty.cs
- XsltQilFactory.cs
- OleAutBinder.cs
- SecureConversationVersion.cs
- Error.cs
- ConsoleTraceListener.cs
- InternalDuplexChannelFactory.cs
- CharacterBufferReference.cs
- RadioButton.cs
- AuthenticationSection.cs
- Buffer.cs
- FunctionImportMapping.cs
- TextEncodedRawTextWriter.cs
- ConfigXmlText.cs
- WebPartConnection.cs
- MemberCollection.cs
- UndirectedGraph.cs
- DataSourceHelper.cs
- Graph.cs
- ClientScriptItemCollection.cs
- BitmapSource.cs
- SqlParameterizer.cs
- ActivityExecutorDelegateInfo.cs
- DocumentXmlWriter.cs
- SchemaImporterExtension.cs
- XmlSchemaSubstitutionGroup.cs
- DataGridPagerStyle.cs
- SectionInput.cs
- FigureParagraph.cs
- OperationResponse.cs
- HtmlInputPassword.cs
- ImageListDesigner.cs
- XmlWellformedWriter.cs
- MouseActionConverter.cs
- SecondaryIndex.cs
- COM2FontConverter.cs
- Win32KeyboardDevice.cs
- ListViewCommandEventArgs.cs
- TextDecorationCollection.cs
- TextElement.cs
- PageAsyncTaskManager.cs
- mactripleDES.cs
- ToolStripInSituService.cs
- ConnectionConsumerAttribute.cs
- XPathPatternBuilder.cs
- OrthographicCamera.cs
- StringWriter.cs
- ElementHost.cs
- PassportAuthenticationEventArgs.cs
- PageContent.cs
- ParseChildrenAsPropertiesAttribute.cs
- XmlNamespaceManager.cs
- TrackingMemoryStreamFactory.cs
- ToolStripEditorManager.cs
- ScriptComponentDescriptor.cs
- CounterSampleCalculator.cs
- Validator.cs
- OutputCacheSection.cs
- GenericUriParser.cs
- RotateTransform.cs
- InitializerFacet.cs
- DockAndAnchorLayout.cs
- RowVisual.cs
- BuiltInExpr.cs
- DataGridItem.cs
- SmtpNetworkElement.cs
- Imaging.cs
- CollectionEditorDialog.cs
- TrackingStringDictionary.cs
- DesignerView.Commands.cs
- XmlSchemaObjectTable.cs
- COSERVERINFO.cs
- EdmPropertyAttribute.cs
- PeoplePickerWrapper.cs
- DebugHandleTracker.cs
- graph.cs
- latinshape.cs
- StringDictionary.cs
- IPEndPointCollection.cs