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
- SegmentInfo.cs
- RemotingSurrogateSelector.cs
- SourceLineInfo.cs
- ConsumerConnectionPoint.cs
- UrlMappingsModule.cs
- Stackframe.cs
- OutputCacheSection.cs
- RemotingSurrogateSelector.cs
- TreeNodeStyle.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- FtpCachePolicyElement.cs
- BufferBuilder.cs
- SQLBoolean.cs
- AdRotatorDesigner.cs
- DigitShape.cs
- MessageQueueException.cs
- OptimizerPatterns.cs
- NodeLabelEditEvent.cs
- SqlInternalConnectionTds.cs
- XDRSchema.cs
- TimeSpanValidatorAttribute.cs
- IgnoreDeviceFilterElement.cs
- TableLayoutColumnStyleCollection.cs
- PageTheme.cs
- CustomAttribute.cs
- ContextMenu.cs
- DescendentsWalkerBase.cs
- ImpersonationContext.cs
- StdValidatorsAndConverters.cs
- Cursor.cs
- StringPropertyBuilder.cs
- EditorZone.cs
- Base64Stream.cs
- ReadOnlyDataSource.cs
- DrawingDrawingContext.cs
- CodeCommentStatementCollection.cs
- WrappedReader.cs
- EntitySqlQueryBuilder.cs
- XPathConvert.cs
- Debugger.cs
- OdbcConnectionPoolProviderInfo.cs
- EntityContainerAssociationSet.cs
- CodeDelegateCreateExpression.cs
- UnicodeEncoding.cs
- StatusBarItem.cs
- MethodAccessException.cs
- CodeMethodReturnStatement.cs
- XamlReaderHelper.cs
- NavigatorInput.cs
- NativeMethods.cs
- PageClientProxyGenerator.cs
- HttpFileCollection.cs
- FileInfo.cs
- RectangleGeometry.cs
- GraphicsPath.cs
- DocumentAutomationPeer.cs
- TableAdapterManagerNameHandler.cs
- ScrollData.cs
- ReferenceEqualityComparer.cs
- Point3D.cs
- ConnectionOrientedTransportChannelListener.cs
- Part.cs
- Attribute.cs
- IssuanceLicense.cs
- precedingsibling.cs
- XmlExpressionDumper.cs
- ProvidePropertyAttribute.cs
- MenuItemCollection.cs
- KeyedCollection.cs
- DBAsyncResult.cs
- PriorityItem.cs
- SettingsBindableAttribute.cs
- JavaScriptString.cs
- CodeSnippetExpression.cs
- RelationshipEnd.cs
- ModulesEntry.cs
- HttpCacheParams.cs
- IdentitySection.cs
- CodeMemberField.cs
- SemanticResultValue.cs
- RuleProcessor.cs
- ElasticEase.cs
- BindingMAnagerBase.cs
- SudsParser.cs
- TerminateWorkflow.cs
- GroupLabel.cs
- URLBuilder.cs
- WorkflowTransactionOptions.cs
- XmlSchemaComplexContentRestriction.cs
- HWStack.cs
- Rotation3DKeyFrameCollection.cs
- ChildrenQuery.cs
- ClaimTypeElementCollection.cs
- __Filters.cs
- DescendentsWalkerBase.cs
- SqlRowUpdatedEvent.cs
- SchemaImporter.cs
- TranslateTransform.cs
- NotifyParentPropertyAttribute.cs
- Label.cs