Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / Input / Stylus / Tablet.cs / 1 / Tablet.cs
using System; using System.Windows; using System.Windows.Threading; using System.Security; namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// ////// Class containing only static methods to access tablet info. /// public static class Tablet { ///////////////////////////////////////////////////////////////////// ////// Read-only access to the Tablet device associated with the current event /// for the current input manager. /// public static TabletDevice CurrentTabletDevice { get { StylusDevice stylus = Stylus.CurrentStylusDevice; if (stylus == null) return null; return stylus.TabletDevice; } } ///////////////////////////////////////////////////////////////////// ////// Returns the collection of Tablet Devices defined on this tablet. /// ////// Critical: calls into SecurityCritical code (Stylus.TabletDevices) /// PublicOK: - asserts for unmanaged code access (via SUC) to create TabletDevices. /// - returns our collection of TabletDevices which we want public. /// public static TabletDeviceCollection TabletDevices { [SecurityCritical] get { return StylusLogic.CurrentStylusLogic.TabletDevices; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.Windows; using System.Windows.Threading; using System.Security; namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// ////// Class containing only static methods to access tablet info. /// public static class Tablet { ///////////////////////////////////////////////////////////////////// ////// Read-only access to the Tablet device associated with the current event /// for the current input manager. /// public static TabletDevice CurrentTabletDevice { get { StylusDevice stylus = Stylus.CurrentStylusDevice; if (stylus == null) return null; return stylus.TabletDevice; } } ///////////////////////////////////////////////////////////////////// ////// Returns the collection of Tablet Devices defined on this tablet. /// ////// Critical: calls into SecurityCritical code (Stylus.TabletDevices) /// PublicOK: - asserts for unmanaged code access (via SUC) to create TabletDevices. /// - returns our collection of TabletDevices which we want public. /// public static TabletDeviceCollection TabletDevices { [SecurityCritical] get { return StylusLogic.CurrentStylusLogic.TabletDevices; } } } } // 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
- _SslSessionsCache.cs
- ResetableIterator.cs
- Semaphore.cs
- MemberInfoSerializationHolder.cs
- ReliableSessionElement.cs
- XPathDocumentBuilder.cs
- ParameterElementCollection.cs
- PointAnimation.cs
- CompilerGeneratedAttribute.cs
- EntityDataSourceConfigureObjectContext.cs
- XsltFunctions.cs
- XPathBinder.cs
- SortedSetDebugView.cs
- TileBrush.cs
- PreloadedPackages.cs
- TextElementCollectionHelper.cs
- ScrollableControl.cs
- AuthenticationSection.cs
- ConnectionInterfaceCollection.cs
- SubtreeProcessor.cs
- GraphicsContainer.cs
- FocusTracker.cs
- ServiceDurableInstanceContextProvider.cs
- ExpandCollapseProviderWrapper.cs
- ReservationCollection.cs
- CircleHotSpot.cs
- NumericUpDownAccelerationCollection.cs
- GridEntry.cs
- XamlTypeMapper.cs
- DataRowExtensions.cs
- Timeline.cs
- _SSPIWrapper.cs
- TypeConverterMarkupExtension.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- PropertyKey.cs
- CombinedGeometry.cs
- MetadataArtifactLoaderResource.cs
- lengthconverter.cs
- DbConnectionStringBuilder.cs
- versioninfo.cs
- _BufferOffsetSize.cs
- ParseHttpDate.cs
- PlanCompilerUtil.cs
- RoutedEventValueSerializer.cs
- EditingContext.cs
- _SecureChannel.cs
- SpeechDetectedEventArgs.cs
- SerTrace.cs
- LinkClickEvent.cs
- DrawingBrush.cs
- NumericExpr.cs
- TaskbarItemInfo.cs
- COAUTHIDENTITY.cs
- GetCardDetailsRequest.cs
- DateTimeEditor.cs
- ConversionHelper.cs
- FileSystemInfo.cs
- QilFunction.cs
- ToolStripSeparatorRenderEventArgs.cs
- PeerNode.cs
- NavigationProperty.cs
- MarginsConverter.cs
- ImportContext.cs
- TemplateBindingExpressionConverter.cs
- TextDecorationUnitValidation.cs
- CustomSignedXml.cs
- TextEditorSpelling.cs
- ByteConverter.cs
- ADConnectionHelper.cs
- DES.cs
- JsonFormatGeneratorStatics.cs
- RoutedEventArgs.cs
- TickBar.cs
- OracleConnectionString.cs
- FlowDocumentReaderAutomationPeer.cs
- PageBuildProvider.cs
- SecurityHelper.cs
- X509ImageLogo.cs
- GridEntryCollection.cs
- HexParser.cs
- TextTreeUndoUnit.cs
- WebPartEditorApplyVerb.cs
- TextElementCollectionHelper.cs
- EventWaitHandleSecurity.cs
- RC2.cs
- CharStorage.cs
- QilScopedVisitor.cs
- RangeBase.cs
- KnownBoxes.cs
- EventQueueState.cs
- ReadOnlyCollection.cs
- InternalCache.cs
- OleAutBinder.cs
- ObjectDataSourceSelectingEventArgs.cs
- ParserOptions.cs
- XmlBinaryReaderSession.cs
- X509PeerCertificateAuthenticationElement.cs
- WindowsToolbarAsMenu.cs
- CookieProtection.cs
- ScriptReferenceBase.cs