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
- ObjectListCommandCollection.cs
- InfoCardProofToken.cs
- AccessText.cs
- StringCollection.cs
- XMLDiffLoader.cs
- AuthenticateEventArgs.cs
- CharAnimationBase.cs
- SingleKeyFrameCollection.cs
- NameHandler.cs
- ResolveMatchesMessageCD1.cs
- XmlReader.cs
- TimerEventSubscriptionCollection.cs
- SerializerWriterEventHandlers.cs
- mda.cs
- ContentTextAutomationPeer.cs
- ButtonBase.cs
- WebPartManagerInternals.cs
- DesignerProperties.cs
- BindingMemberInfo.cs
- HttpPostProtocolImporter.cs
- PersistenceException.cs
- EmissiveMaterial.cs
- ListViewDataItem.cs
- LedgerEntry.cs
- ConfigurationManagerHelper.cs
- InkCanvasSelection.cs
- XmlTextReaderImpl.cs
- PlainXmlWriter.cs
- ObjectAssociationEndMapping.cs
- LocatorGroup.cs
- ArgumentOutOfRangeException.cs
- SmiEventSink_Default.cs
- Int32Animation.cs
- DataObjectAttribute.cs
- RuntimeEnvironment.cs
- SelectingProviderEventArgs.cs
- WindowsTooltip.cs
- VariableQuery.cs
- VirtualDirectoryMappingCollection.cs
- InstancePersistenceException.cs
- SoapFault.cs
- NamespaceDecl.cs
- BrowserDefinition.cs
- ExpressionBuilder.cs
- Stylesheet.cs
- CodeTypeConstructor.cs
- HiddenFieldPageStatePersister.cs
- FamilyCollection.cs
- CheckPair.cs
- TypeUsageBuilder.cs
- CheckoutException.cs
- ObjectNotFoundException.cs
- Int16Storage.cs
- MultiBinding.cs
- ConfigurationProviderException.cs
- UnsafeNativeMethods.cs
- UnmanagedHandle.cs
- CommonDialog.cs
- QilFunction.cs
- ToolStripOverflow.cs
- Registry.cs
- LabelAutomationPeer.cs
- Item.cs
- DesignTimeHTMLTextWriter.cs
- InputEventArgs.cs
- Shape.cs
- URL.cs
- SerializerProvider.cs
- HitTestParameters3D.cs
- SafeMarshalContext.cs
- TextReader.cs
- ExceptionValidationRule.cs
- SqlConnection.cs
- AudioLevelUpdatedEventArgs.cs
- DriveNotFoundException.cs
- PersonalizationAdministration.cs
- TableSectionStyle.cs
- FixedSOMLineCollection.cs
- XMLUtil.cs
- peersecurityelement.cs
- TextFindEngine.cs
- ByValueEqualityComparer.cs
- StaticExtension.cs
- EmptyEnumerator.cs
- cookie.cs
- PrimitiveCodeDomSerializer.cs
- SymmetricKeyWrap.cs
- MobileComponentEditorPage.cs
- DrawingAttributesDefaultValueFactory.cs
- RightNameExpirationInfoPair.cs
- ErrorStyle.cs
- SplineKeyFrames.cs
- HttpCapabilitiesEvaluator.cs
- ResourceContainer.cs
- Material.cs
- AssemblyHash.cs
- SqlClientPermission.cs
- CustomExpression.cs
- DataGridViewBand.cs
- DataDesignUtil.cs