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
- ObjectCloneHelper.cs
- ThreadSafeList.cs
- TaskFileService.cs
- Label.cs
- FormCollection.cs
- ActiveXSite.cs
- MessageSmuggler.cs
- HideDisabledControlAdapter.cs
- DataGridViewCellStyleConverter.cs
- DataView.cs
- SHA1Cng.cs
- FrameworkContentElement.cs
- FlatButtonAppearance.cs
- WebSysDefaultValueAttribute.cs
- RuntimeConfigurationRecord.cs
- InkCanvasAutomationPeer.cs
- LZCodec.cs
- RegionInfo.cs
- PrintPreviewControl.cs
- TraceHandler.cs
- XmlAnyElementAttributes.cs
- PathFigureCollection.cs
- IdentityManager.cs
- ObjectListFieldsPage.cs
- SystemSounds.cs
- PerfService.cs
- ProviderConnectionPoint.cs
- SharedTcpTransportManager.cs
- hresults.cs
- CheckBoxField.cs
- StatusCommandUI.cs
- NoResizeSelectionBorderGlyph.cs
- DataSourceControl.cs
- SelectedDatesCollection.cs
- MembershipUser.cs
- MsmqAuthenticationMode.cs
- ColumnResizeUndoUnit.cs
- BooleanToVisibilityConverter.cs
- DocumentViewerHelper.cs
- SizeChangedEventArgs.cs
- NetworkInformationPermission.cs
- ObjectListCommandEventArgs.cs
- ApplicationServiceHelper.cs
- HtmlTextArea.cs
- XslCompiledTransform.cs
- ImageButton.cs
- SessionEndingCancelEventArgs.cs
- SystemMulticastIPAddressInformation.cs
- Metadata.cs
- ParseElementCollection.cs
- QilNode.cs
- EnumerationRangeValidationUtil.cs
- SystemThemeKey.cs
- MouseOverProperty.cs
- VirtualizedCellInfoCollection.cs
- XmlSchemaSimpleTypeUnion.cs
- NamespaceCollection.cs
- IsolatedStorageException.cs
- DataGridViewSortCompareEventArgs.cs
- SerialPinChanges.cs
- ProtocolsSection.cs
- StaticTextPointer.cs
- StaticExtensionConverter.cs
- ControlCollection.cs
- Point4DConverter.cs
- OverflowException.cs
- ITreeGenerator.cs
- ToolStripMenuItem.cs
- DeclaredTypeValidatorAttribute.cs
- WorkflowDebuggerSteppingAttribute.cs
- GridViewPageEventArgs.cs
- __ComObject.cs
- TimeSpan.cs
- TypeConverterHelper.cs
- MessageLogger.cs
- SqlProfileProvider.cs
- OrderedDictionary.cs
- ArgumentValidation.cs
- SpellerHighlightLayer.cs
- SecurityHelper.cs
- UnsafeMethods.cs
- WebPartEditVerb.cs
- TreeChangeInfo.cs
- RequestCacheManager.cs
- AlternationConverter.cs
- EventRecord.cs
- ListItemCollection.cs
- SystemDropShadowChrome.cs
- ElementNotAvailableException.cs
- ConvertersCollection.cs
- InstanceKeyView.cs
- Operator.cs
- ConfigXmlWhitespace.cs
- NetCodeGroup.cs
- DbConnectionPoolIdentity.cs
- QueueAccessMode.cs
- ProfileProvider.cs
- BrowserCapabilitiesFactoryBase.cs
- ManipulationBoundaryFeedbackEventArgs.cs
- SqlTopReducer.cs