Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- TextEditorDragDrop.cs
- TextServicesDisplayAttribute.cs
- SamlConditions.cs
- listitem.cs
- ArithmeticException.cs
- StringArrayEditor.cs
- SQLRoleProvider.cs
- XmlKeywords.cs
- ExpressionNormalizer.cs
- SqlInternalConnection.cs
- ProcessHostMapPath.cs
- ShaderRenderModeValidation.cs
- _AutoWebProxyScriptEngine.cs
- OutOfMemoryException.cs
- DefaultParameterValueAttribute.cs
- SecurityCriticalDataForSet.cs
- XmlAttributeCache.cs
- ExpressionParser.cs
- GridViewColumnHeader.cs
- TokenBasedSet.cs
- InputBuffer.cs
- ProcessingInstructionAction.cs
- StreamMarshaler.cs
- VirtualPathUtility.cs
- XsltArgumentList.cs
- WindowsGrip.cs
- StreamUpgradeInitiator.cs
- RegularExpressionValidator.cs
- ObjectViewEntityCollectionData.cs
- RegexWorker.cs
- TemplateField.cs
- SignatureDescription.cs
- FusionWrap.cs
- XmlSchemaType.cs
- DataList.cs
- DataReceivedEventArgs.cs
- AlgoModule.cs
- DebugView.cs
- ThreadAttributes.cs
- BamlBinaryWriter.cs
- AddIn.cs
- BreakRecordTable.cs
- MessageFormatterConverter.cs
- PartManifestEntry.cs
- HtmlControl.cs
- Version.cs
- VisualBrush.cs
- GlobalizationSection.cs
- CollectionChangedEventManager.cs
- TimelineCollection.cs
- SignatureHelper.cs
- SupportingTokenSpecification.cs
- SqlCacheDependency.cs
- TreeNodeBinding.cs
- ScriptModule.cs
- XmlSchemaAnnotation.cs
- SevenBitStream.cs
- XhtmlStyleClass.cs
- CheckableControlBaseAdapter.cs
- _SSPIWrapper.cs
- ColumnTypeConverter.cs
- TextTreeText.cs
- TypeUsage.cs
- ExpressionBuilder.cs
- ErrorTableItemStyle.cs
- SchemaComplexType.cs
- StringArrayConverter.cs
- baseaxisquery.cs
- IPHostEntry.cs
- ServiceDocumentFormatter.cs
- PeerPresenceInfo.cs
- FirewallWrapper.cs
- WizardPanelChangingEventArgs.cs
- DataListItemEventArgs.cs
- SystemWebSectionGroup.cs
- TypeValidationEventArgs.cs
- ThicknessAnimation.cs
- XmlElement.cs
- ButtonBaseAdapter.cs
- SocketPermission.cs
- XsltContext.cs
- Directory.cs
- EmptyCollection.cs
- UseLicense.cs
- DataObjectPastingEventArgs.cs
- CheckBoxRenderer.cs
- InputLangChangeRequestEvent.cs
- DefaultObjectMappingItemCollection.cs
- AbstractExpressions.cs
- NamespaceDecl.cs
- InputMethodStateChangeEventArgs.cs
- CallTemplateAction.cs
- ContainerUtilities.cs
- WindowShowOrOpenTracker.cs
- XmlDataLoader.cs
- DefaultBinder.cs
- SoapAttributeAttribute.cs
- DrawTreeNodeEventArgs.cs
- Operand.cs
- RegionData.cs