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
- TextBreakpoint.cs
- TextEndOfParagraph.cs
- CaseInsensitiveHashCodeProvider.cs
- PkcsUtils.cs
- DecoderFallbackWithFailureFlag.cs
- SoapElementAttribute.cs
- OletxVolatileEnlistment.cs
- WindowsTokenRoleProvider.cs
- Pair.cs
- DataGridItemEventArgs.cs
- EndpointAddressMessageFilter.cs
- QueryRewriter.cs
- CompiledQueryCacheEntry.cs
- GridSplitter.cs
- InheritanceContextHelper.cs
- ResourceBinder.cs
- InputLangChangeRequestEvent.cs
- QueryableDataSource.cs
- Emitter.cs
- Context.cs
- StyleCollection.cs
- DataGridViewTextBoxEditingControl.cs
- EventBuilder.cs
- ProcessInfo.cs
- WindowsUpDown.cs
- ListViewGroup.cs
- TextRunCache.cs
- COM2EnumConverter.cs
- HtmlInputCheckBox.cs
- HtmlPanelAdapter.cs
- ADMembershipUser.cs
- Transform3D.cs
- EntityContainerEmitter.cs
- AudioFormatConverter.cs
- NativeMethods.cs
- XNodeSchemaApplier.cs
- DynamicResourceExtensionConverter.cs
- EntityException.cs
- ActivityCodeDomSerializationManager.cs
- BuildManagerHost.cs
- ProfileProvider.cs
- SessionStateUtil.cs
- CategoryAttribute.cs
- Rijndael.cs
- ScriptBehaviorDescriptor.cs
- DispatchWrapper.cs
- JsonReaderWriterFactory.cs
- SmtpLoginAuthenticationModule.cs
- SafeCoTaskMem.cs
- MimeTextImporter.cs
- EncoderBestFitFallback.cs
- URLAttribute.cs
- ByteAnimationUsingKeyFrames.cs
- ComponentResourceKey.cs
- SelectionUIHandler.cs
- PenLineJoinValidation.cs
- MimeReflector.cs
- AsymmetricAlgorithm.cs
- HttpProfileBase.cs
- AbandonedMutexException.cs
- QilReplaceVisitor.cs
- FileLevelControlBuilderAttribute.cs
- CuspData.cs
- ItemCollection.cs
- InfoCardRSACryptoProvider.cs
- DomainLiteralReader.cs
- WebServiceHandlerFactory.cs
- DependencyProperty.cs
- TreeViewItem.cs
- OleCmdHelper.cs
- BrowserCapabilitiesFactoryBase.cs
- UnknownWrapper.cs
- Point3DConverter.cs
- MenuCommandService.cs
- ComPlusAuthorization.cs
- ObjectAnimationBase.cs
- EmptyEnumerator.cs
- StatusBarItemAutomationPeer.cs
- ListBoxChrome.cs
- ServicePointManagerElement.cs
- LayoutUtils.cs
- SafeRegistryHandle.cs
- ValidationError.cs
- RijndaelManagedTransform.cs
- ToolStripDropDownClosedEventArgs.cs
- ProcessThread.cs
- KnownIds.cs
- CompilationLock.cs
- SiteMapNodeItemEventArgs.cs
- ThumbAutomationPeer.cs
- WithParamAction.cs
- FrameworkElementFactoryMarkupObject.cs
- XmlUrlResolver.cs
- AdRotator.cs
- DataGridViewLinkCell.cs
- PeerChannelListener.cs
- WindowsStartMenu.cs
- FormViewDeleteEventArgs.cs
- AmbiguousMatchException.cs
- Localizer.cs