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
- FamilyMapCollection.cs
- AutomationPropertyInfo.cs
- SQLGuid.cs
- Event.cs
- AutoGeneratedFieldProperties.cs
- SequentialUshortCollection.cs
- Peer.cs
- XmlEncoding.cs
- PointUtil.cs
- ContextMenuStripActionList.cs
- SqlBinder.cs
- SqlRowUpdatedEvent.cs
- Literal.cs
- CanonicalFontFamilyReference.cs
- NumberSubstitution.cs
- SqlComparer.cs
- DrawingGroup.cs
- DbConnectionStringBuilder.cs
- DataProtection.cs
- TdsParser.cs
- DiagnosticsConfigurationHandler.cs
- EventMappingSettingsCollection.cs
- Function.cs
- HttpDebugHandler.cs
- CacheDependency.cs
- XsdValidatingReader.cs
- XamlInt32CollectionSerializer.cs
- MouseButtonEventArgs.cs
- VScrollProperties.cs
- wgx_render.cs
- FtpWebResponse.cs
- AsymmetricKeyExchangeDeformatter.cs
- ForceCopyBuildProvider.cs
- MsmqPoisonMessageException.cs
- EncoderFallback.cs
- CommonGetThemePartSize.cs
- TextRangeEdit.cs
- TabPage.cs
- HttpRawResponse.cs
- InteropAutomationProvider.cs
- RequestDescription.cs
- NetPeerTcpBindingElement.cs
- UnhandledExceptionEventArgs.cs
- Privilege.cs
- InternalEnumValidatorAttribute.cs
- TrackingProfileCache.cs
- WSSecurityXXX2005.cs
- OpenFileDialog.cs
- GiveFeedbackEvent.cs
- FixedMaxHeap.cs
- Application.cs
- FamilyCollection.cs
- returneventsaver.cs
- BoundColumn.cs
- DBCommandBuilder.cs
- CounterSample.cs
- StreamInfo.cs
- FontSource.cs
- RepeatBehavior.cs
- PopupEventArgs.cs
- CreateUserErrorEventArgs.cs
- CompositeFontParser.cs
- SetStoryboardSpeedRatio.cs
- ZoneLinkButton.cs
- ResourceReferenceExpression.cs
- JsonEnumDataContract.cs
- webproxy.cs
- SecurityPermission.cs
- PasswordBox.cs
- DataReceivedEventArgs.cs
- ProxyGenerationError.cs
- DateTimeOffset.cs
- Facet.cs
- PasswordRecoveryDesigner.cs
- CodeDelegateCreateExpression.cs
- OledbConnectionStringbuilder.cs
- MonthCalendar.cs
- LicFileLicenseProvider.cs
- HttpCapabilitiesEvaluator.cs
- ToolboxItemAttribute.cs
- OleDbMetaDataFactory.cs
- DynamicFilter.cs
- SerializerProvider.cs
- MasterPage.cs
- WindowsGraphicsCacheManager.cs
- PaintEvent.cs
- CrossSiteScriptingValidation.cs
- LoaderAllocator.cs
- ExpressionBuilder.cs
- TemplatePropertyEntry.cs
- GridViewRowEventArgs.cs
- TextCharacters.cs
- PerformanceCounterCategory.cs
- WindowCollection.cs
- IIS7UserPrincipal.cs
- ThousandthOfEmRealPoints.cs
- LayoutEditorPart.cs
- SHA1Managed.cs
- HorizontalAlignConverter.cs
- XmlSchemaChoice.cs