Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Input / Stylus / Tablet.cs / 1305600 / 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
- DataServiceClientException.cs
- ProcessThread.cs
- SoapDocumentMethodAttribute.cs
- SafeRightsManagementSessionHandle.cs
- BitmapImage.cs
- GridViewColumnCollectionChangedEventArgs.cs
- RepeaterCommandEventArgs.cs
- OneToOneMappingSerializer.cs
- PeerNameRecord.cs
- CompilerParameters.cs
- ListItemConverter.cs
- PnrpPermission.cs
- UrlAuthFailedErrorFormatter.cs
- CurrentChangedEventManager.cs
- FilterableAttribute.cs
- CommandArguments.cs
- InputProcessorProfiles.cs
- Directory.cs
- SiteMembershipCondition.cs
- GcSettings.cs
- SessionPageStatePersister.cs
- SkipStoryboardToFill.cs
- WebPartTracker.cs
- ContentIterators.cs
- OneWayBindingElementImporter.cs
- MetadataCache.cs
- RootProfilePropertySettingsCollection.cs
- PermissionListSet.cs
- ConfigurationValues.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- HierarchicalDataBoundControl.cs
- MsmqIntegrationSecurity.cs
- MD5CryptoServiceProvider.cs
- Rotation3DAnimationBase.cs
- EnvironmentPermission.cs
- WindowsImpersonationContext.cs
- UpdatePanelTrigger.cs
- DataSourceUtil.cs
- xmlformatgeneratorstatics.cs
- ComplexLine.cs
- FormViewUpdatedEventArgs.cs
- CodeTryCatchFinallyStatement.cs
- SafeLibraryHandle.cs
- AccessViolationException.cs
- ListViewInsertedEventArgs.cs
- ProcessThread.cs
- DbModificationClause.cs
- SettingsSection.cs
- ScrollProviderWrapper.cs
- WinInetCache.cs
- SqlDataSourceCache.cs
- NetCodeGroup.cs
- PagerSettings.cs
- XmlDesigner.cs
- GraphicsPath.cs
- TdsParserStaticMethods.cs
- KeyPressEvent.cs
- EventSinkHelperWriter.cs
- documentation.cs
- FacetChecker.cs
- Html32TextWriter.cs
- StorageComplexTypeMapping.cs
- UnsafeNativeMethods.cs
- QueryOptionExpression.cs
- KeyGestureValueSerializer.cs
- odbcmetadatacollectionnames.cs
- ProfileBuildProvider.cs
- SiteMapProvider.cs
- SubclassTypeValidatorAttribute.cs
- DataColumnPropertyDescriptor.cs
- ScriptModule.cs
- ACL.cs
- EventDriven.cs
- MessageHeaderT.cs
- TypeLoadException.cs
- DesignerGenericWebPart.cs
- TextProperties.cs
- QueryOptionExpression.cs
- ThousandthOfEmRealDoubles.cs
- ToolBarDesigner.cs
- SlipBehavior.cs
- SqlNotificationEventArgs.cs
- EllipticalNodeOperations.cs
- HwndStylusInputProvider.cs
- XPathConvert.cs
- VisualBrush.cs
- StoreItemCollection.Loader.cs
- MetadataCollection.cs
- EncoderReplacementFallback.cs
- QueryReaderSettings.cs
- AuthorizationRuleCollection.cs
- Int64Converter.cs
- XmlMapping.cs
- DemultiplexingClientMessageFormatter.cs
- WpfWebRequestHelper.cs
- Duration.cs
- XmlSiteMapProvider.cs
- FileSecurity.cs
- BlurBitmapEffect.cs
- XmlSchemaImport.cs