Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- ResponseStream.cs
- securitymgrsite.cs
- BinaryReader.cs
- SqlMethodCallConverter.cs
- CodeRegionDirective.cs
- DataGridViewImageCell.cs
- SQLRoleProvider.cs
- MimeFormReflector.cs
- GlyphTypeface.cs
- HttpContext.cs
- GridViewRowPresenterBase.cs
- BaseValidatorDesigner.cs
- CoreSwitches.cs
- Operator.cs
- KerberosSecurityTokenProvider.cs
- MsmqInputMessage.cs
- Single.cs
- DetailsViewUpdateEventArgs.cs
- XmlDataCollection.cs
- IntAverageAggregationOperator.cs
- XmlHierarchicalDataSourceView.cs
- GACIdentityPermission.cs
- FormViewUpdatedEventArgs.cs
- ScheduleChanges.cs
- ActiveXMessageFormatter.cs
- WeakReadOnlyCollection.cs
- ConfigXmlAttribute.cs
- unitconverter.cs
- EmptyStringExpandableObjectConverter.cs
- ZipIOCentralDirectoryBlock.cs
- SmiTypedGetterSetter.cs
- EntitySqlQueryCacheKey.cs
- StreamAsIStream.cs
- DataAdapter.cs
- ContractListAdapter.cs
- DecoderNLS.cs
- MetadataReference.cs
- VBCodeProvider.cs
- Win32MouseDevice.cs
- TextServicesContext.cs
- ResourcesChangeInfo.cs
- CompilerResults.cs
- Accessible.cs
- MetadataItemCollectionFactory.cs
- FieldAccessException.cs
- PerfService.cs
- Floater.cs
- sitestring.cs
- CursorInteropHelper.cs
- Splitter.cs
- Assembly.cs
- TextSearch.cs
- TemplatedMailWebEventProvider.cs
- RelationshipNavigation.cs
- Pool.cs
- ToolboxItemAttribute.cs
- CheckBoxRenderer.cs
- WebPartCancelEventArgs.cs
- HttpProfileGroupBase.cs
- WmpBitmapDecoder.cs
- ContainerSelectorActiveEvent.cs
- NativeMethods.cs
- GroupStyle.cs
- ArgumentNullException.cs
- HyperLinkStyle.cs
- JsonEncodingStreamWrapper.cs
- ObjectDataSourceSelectingEventArgs.cs
- RegistrySecurity.cs
- FixedSOMTableCell.cs
- TransformDescriptor.cs
- ParseChildrenAsPropertiesAttribute.cs
- TableSectionStyle.cs
- SystemSounds.cs
- AttachmentService.cs
- SqlRowUpdatedEvent.cs
- CAGDesigner.cs
- __Filters.cs
- BufferBuilder.cs
- BmpBitmapDecoder.cs
- DocumentViewerBaseAutomationPeer.cs
- DataBinding.cs
- RNGCryptoServiceProvider.cs
- AncillaryOps.cs
- TraceListeners.cs
- GenericAuthenticationEventArgs.cs
- AccessibleObject.cs
- ChangeTracker.cs
- SafeCryptoHandles.cs
- DynamicPropertyHolder.cs
- TextBreakpoint.cs
- VisualTreeUtils.cs
- EventItfInfo.cs
- SQLBoolean.cs
- FontInfo.cs
- DebugControllerThread.cs
- Inflater.cs
- TriState.cs
- CodeRemoveEventStatement.cs
- DashStyle.cs
- ConnectionOrientedTransportChannelFactory.cs