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
- StateItem.cs
- XmlReaderSettings.cs
- ConfigXmlAttribute.cs
- AnchoredBlock.cs
- GuidConverter.cs
- XmlAttributeProperties.cs
- LinqDataSourceEditData.cs
- ObjectFullSpanRewriter.cs
- SqlDataSourceFilteringEventArgs.cs
- CodeCommentStatementCollection.cs
- ScrollViewer.cs
- SctClaimDictionary.cs
- ResourceReferenceExpressionConverter.cs
- FindCriteriaApril2005.cs
- SafeCryptoHandles.cs
- AssociationTypeEmitter.cs
- ScrollItemPatternIdentifiers.cs
- WebPartTracker.cs
- WindowsEditBox.cs
- DBParameter.cs
- StructuralCache.cs
- StoreAnnotationsMap.cs
- CheckBoxPopupAdapter.cs
- LogSwitch.cs
- EntityObject.cs
- XmlAttributeOverrides.cs
- ClientSideQueueItem.cs
- EncryptedPackageFilter.cs
- PtsPage.cs
- ToolStripDropDownClosingEventArgs.cs
- XamlFilter.cs
- ConnectionStringEditor.cs
- WindowsTitleBar.cs
- ServicesUtilities.cs
- DictionaryBase.cs
- OpenTypeLayout.cs
- EntityDataSourceColumn.cs
- WebResourceAttribute.cs
- x509store.cs
- ItemAutomationPeer.cs
- CollectionBuilder.cs
- ListSourceHelper.cs
- Icon.cs
- HMACSHA256.cs
- CatalogPart.cs
- DocumentScope.cs
- InheritanceAttribute.cs
- ContextMenuService.cs
- MappingSource.cs
- AttachedPropertyDescriptor.cs
- AssemblyAssociatedContentFileAttribute.cs
- HelpKeywordAttribute.cs
- Unit.cs
- CellParaClient.cs
- Brush.cs
- Int64Animation.cs
- TextEditorContextMenu.cs
- SystemIcmpV6Statistics.cs
- BoundingRectTracker.cs
- ContextMarshalException.cs
- MeshGeometry3D.cs
- IndicCharClassifier.cs
- Parameter.cs
- XmlSchemaGroupRef.cs
- ModelMemberCollection.cs
- SystemDiagnosticsSection.cs
- UrlMappingsModule.cs
- UriSectionData.cs
- GestureRecognitionResult.cs
- TypeConverterHelper.cs
- SafeNativeMethods.cs
- ModelTreeManager.cs
- TextEditorTables.cs
- SimpleHandlerFactory.cs
- PlatformCulture.cs
- SecurityRuntime.cs
- ColorConvertedBitmap.cs
- SequentialOutput.cs
- Match.cs
- XmlSerializationGeneratedCode.cs
- DirtyTextRange.cs
- AtomEntry.cs
- BufferedStream2.cs
- CodeSubDirectory.cs
- RoleServiceManager.cs
- BindToObject.cs
- QuaternionRotation3D.cs
- EmbeddedMailObjectsCollection.cs
- XmlConvert.cs
- HtmlInputHidden.cs
- ButtonBase.cs
- ApplicationServicesHostFactory.cs
- DataListDesigner.cs
- CorrelationManager.cs
- dbenumerator.cs
- WebPartTracker.cs
- SoapFault.cs
- CellConstantDomain.cs
- GeometryValueSerializer.cs
- ReaderWriterLockWrapper.cs