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
- TaskHelper.cs
- ConsumerConnectionPointCollection.cs
- CardSpaceSelector.cs
- BinaryMessageEncodingElement.cs
- Timer.cs
- TimeSpan.cs
- MetadataWorkspace.cs
- CodeAccessPermission.cs
- ConsoleCancelEventArgs.cs
- HttpModuleAction.cs
- Marshal.cs
- KeyManager.cs
- HashMembershipCondition.cs
- Matrix.cs
- DisableDpiAwarenessAttribute.cs
- codemethodreferenceexpression.cs
- ZeroOpNode.cs
- ParameterBinding.cs
- CqlIdentifiers.cs
- TempFiles.cs
- WrappedReader.cs
- ConfigurationSection.cs
- DeclarativeCatalogPart.cs
- HelpEvent.cs
- RowBinding.cs
- FileDialog_Vista_Interop.cs
- FtpWebRequest.cs
- SmtpFailedRecipientsException.cs
- Switch.cs
- HttpResponseHeader.cs
- SocketManager.cs
- DataGridViewUtilities.cs
- BooleanKeyFrameCollection.cs
- BaseDataBoundControl.cs
- BitmapMetadataBlob.cs
- SimpleFileLog.cs
- TableDesigner.cs
- StringAttributeCollection.cs
- VisualCollection.cs
- NavigatingCancelEventArgs.cs
- WmpBitmapDecoder.cs
- ControlParser.cs
- WindowsListView.cs
- ExpressionConverter.cs
- DeflateEmulationStream.cs
- RunWorkerCompletedEventArgs.cs
- EditorPart.cs
- DbConnectionPoolIdentity.cs
- ThemeInfoAttribute.cs
- PkcsMisc.cs
- DataReceivedEventArgs.cs
- DocComment.cs
- JsonXmlDataContract.cs
- HostedTcpTransportManager.cs
- CommandBinding.cs
- AsymmetricKeyExchangeDeformatter.cs
- DateTimePicker.cs
- BufferModesCollection.cs
- LayoutEvent.cs
- BindingNavigatorDesigner.cs
- SqlParameter.cs
- AccessText.cs
- ConnectionManagementElementCollection.cs
- Util.cs
- MergeEnumerator.cs
- PreviewPageInfo.cs
- XmlChildNodes.cs
- SoapWriter.cs
- UpWmlPageAdapter.cs
- ExtensibleClassFactory.cs
- UserInitiatedRoutedEventPermission.cs
- KeyNotFoundException.cs
- CodeGroup.cs
- CacheEntry.cs
- CacheVirtualItemsEvent.cs
- CallSiteHelpers.cs
- SecurityManager.cs
- EmissiveMaterial.cs
- TraceListener.cs
- XmlSchemaComplexType.cs
- DataServiceCollectionOfT.cs
- ComponentChangedEvent.cs
- OleDbCommand.cs
- DataServiceQueryException.cs
- ResourceExpressionBuilder.cs
- WebPartMovingEventArgs.cs
- XamlTreeBuilder.cs
- TextElement.cs
- ContentPresenter.cs
- WebException.cs
- NetworkCredential.cs
- DependencyObjectProvider.cs
- WriteTimeStream.cs
- GenericIdentity.cs
- StorageScalarPropertyMapping.cs
- XPathDocumentBuilder.cs
- DataTemplateSelector.cs
- MenuItemStyleCollection.cs
- sqlcontext.cs
- PermissionSetTriple.cs