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
- FrameworkObject.cs
- _Events.cs
- IResourceProvider.cs
- HtmlEmptyTagControlBuilder.cs
- ByteAnimation.cs
- TabletDevice.cs
- PageCatalogPart.cs
- PLINQETWProvider.cs
- UIPropertyMetadata.cs
- TextBox.cs
- BrowserInteropHelper.cs
- PerformanceCountersElement.cs
- IdentityReference.cs
- hebrewshape.cs
- ReflectionPermission.cs
- SqlConnectionString.cs
- XsltOutput.cs
- Profiler.cs
- MaskedTextBox.cs
- BufferedWebEventProvider.cs
- ClearTypeHintValidation.cs
- MessagingDescriptionAttribute.cs
- _NegoStream.cs
- RawTextInputReport.cs
- WebScriptEnablingElement.cs
- InstanceContextManager.cs
- DataServiceRequestOfT.cs
- CssClassPropertyAttribute.cs
- ServicePointManagerElement.cs
- HtmlInputFile.cs
- SrgsRule.cs
- SecurityManager.cs
- Qualifier.cs
- IDataContractSurrogate.cs
- ContractComponent.cs
- AudioFormatConverter.cs
- CacheEntry.cs
- InputBindingCollection.cs
- NotImplementedException.cs
- OperationFormatUse.cs
- FontNamesConverter.cs
- HwndSource.cs
- CommandValueSerializer.cs
- HandleExceptionArgs.cs
- VirtualPath.cs
- XmlSchemaDocumentation.cs
- NumberSubstitution.cs
- assemblycache.cs
- DesignBindingValueUIHandler.cs
- RenderContext.cs
- ViewManager.cs
- Metafile.cs
- MultiPartWriter.cs
- elementinformation.cs
- DesignerSelectionListAdapter.cs
- Tokenizer.cs
- ServiceSecurityAuditBehavior.cs
- AdornerDecorator.cs
- SaveFileDialogDesigner.cs
- ObjectMemberMapping.cs
- MonthCalendar.cs
- _FixedSizeReader.cs
- Timeline.cs
- DataGridViewCheckBoxColumn.cs
- FlowDocumentReader.cs
- ExceptionHandler.cs
- HttpListenerResponse.cs
- UIPropertyMetadata.cs
- UpdateManifestForBrowserApplication.cs
- DataSourceSelectArguments.cs
- CustomAssemblyResolver.cs
- ArithmeticException.cs
- IfAction.cs
- OdbcConnectionOpen.cs
- CompiledRegexRunnerFactory.cs
- RC2CryptoServiceProvider.cs
- VisualStates.cs
- SafeHandles.cs
- RawStylusInputCustomData.cs
- PermissionSetTriple.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- RoleManagerEventArgs.cs
- WebPartsPersonalization.cs
- ActiveDocumentEvent.cs
- FilteredReadOnlyMetadataCollection.cs
- LayoutEngine.cs
- OdbcConnectionHandle.cs
- IDictionary.cs
- HttpGetProtocolReflector.cs
- SecurityKeyIdentifier.cs
- GeneralTransform3DTo2D.cs
- ElementFactory.cs
- Stacktrace.cs
- JoinGraph.cs
- DataContractAttribute.cs
- TransactionContextValidator.cs
- EnumBuilder.cs
- WebHttpSecurityElement.cs
- SqlBinder.cs
- HybridDictionary.cs