Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- LiteralSubsegment.cs
- XPathNavigatorKeyComparer.cs
- XMLUtil.cs
- TextTreeInsertUndoUnit.cs
- CheckBoxPopupAdapter.cs
- hresults.cs
- MenuItemCollection.cs
- TdsEnums.cs
- ConfigurationElementProperty.cs
- SqlCaseSimplifier.cs
- ReaderWriterLockWrapper.cs
- ResourcesGenerator.cs
- LogEntryHeaderDeserializer.cs
- OneOfElement.cs
- SiteMapPath.cs
- QilInvoke.cs
- InertiaExpansionBehavior.cs
- SamlAuthenticationStatement.cs
- CollectionEditorDialog.cs
- SoapIncludeAttribute.cs
- ObjectNotFoundException.cs
- MatrixIndependentAnimationStorage.cs
- ResponseBodyWriter.cs
- HtmlElementCollection.cs
- SqlDataSourceQueryEditorForm.cs
- PageTheme.cs
- ImageCreator.cs
- TabRenderer.cs
- SmtpFailedRecipientException.cs
- FormatterConverter.cs
- StandardTransformFactory.cs
- FlowDecisionDesigner.xaml.cs
- StrokeRenderer.cs
- webeventbuffer.cs
- PageAsyncTaskManager.cs
- PropagatorResult.cs
- DeflateInput.cs
- SignatureDescription.cs
- MemberDescriptor.cs
- HttpRuntimeSection.cs
- WinFormsSecurity.cs
- StandardRuntimeEnumValidator.cs
- Comparer.cs
- AbsoluteQuery.cs
- UpdatePanelTriggerCollection.cs
- Triangle.cs
- ScriptMethodAttribute.cs
- TextStore.cs
- XamlHostingConfiguration.cs
- EntityClientCacheKey.cs
- safemediahandle.cs
- BasicBrowserDialog.cs
- HandlerFactoryWrapper.cs
- WebPartConnectionsConnectVerb.cs
- UrlMappingsModule.cs
- EditingMode.cs
- COM2ExtendedUITypeEditor.cs
- ClientSideQueueItem.cs
- datacache.cs
- WindowsToolbarAsMenu.cs
- MenuItemCollection.cs
- UserMapPath.cs
- PauseStoryboard.cs
- SafeLocalAllocation.cs
- Transform.cs
- CoreSwitches.cs
- WebPartActionVerb.cs
- HelpPage.cs
- FileLogRecord.cs
- AttributeCollection.cs
- TemplateBindingExtensionConverter.cs
- ToolStripScrollButton.cs
- SizeValueSerializer.cs
- SetterBaseCollection.cs
- Property.cs
- ExceptionUtil.cs
- XmlDataSourceDesigner.cs
- KerberosRequestorSecurityTokenAuthenticator.cs
- DesignBindingEditor.cs
- EventHandlersStore.cs
- RTTrackingProfile.cs
- MachineKeySection.cs
- Timer.cs
- SqlPersonalizationProvider.cs
- XComponentModel.cs
- PreservationFileWriter.cs
- FormatConvertedBitmap.cs
- ManagementDateTime.cs
- TreeViewItemAutomationPeer.cs
- WsdlWriter.cs
- DataListGeneralPage.cs
- InplaceBitmapMetadataWriter.cs
- HealthMonitoringSection.cs
- FreezableDefaultValueFactory.cs
- DataSourceSelectArguments.cs
- XmlUtilWriter.cs
- ISFTagAndGuidCache.cs
- NoClickablePointException.cs
- Condition.cs
- XmlRawWriter.cs