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
- ControlCachePolicy.cs
- DataTableMappingCollection.cs
- WsdlBuildProvider.cs
- ImageIndexConverter.cs
- Serializer.cs
- FullTextState.cs
- Paragraph.cs
- FullTextLine.cs
- ListViewCommandEventArgs.cs
- NavigationService.cs
- CellCreator.cs
- XmlQueryOutput.cs
- NegotiationTokenProvider.cs
- XmlEventCache.cs
- ElementFactory.cs
- NaturalLanguageHyphenator.cs
- ResolveNameEventArgs.cs
- DbBuffer.cs
- RangeBase.cs
- PackageRelationship.cs
- WindowsProgressbar.cs
- ContentFileHelper.cs
- ZipIOLocalFileHeader.cs
- PageCatalogPart.cs
- RenderData.cs
- AttributeCollection.cs
- ControlPropertyNameConverter.cs
- AuthorizationSection.cs
- TraceSource.cs
- NativeMethods.cs
- SmtpFailedRecipientsException.cs
- DropShadowBitmapEffect.cs
- HostExecutionContextManager.cs
- Win32KeyboardDevice.cs
- WebReferencesBuildProvider.cs
- Geometry3D.cs
- EpmTargetPathSegment.cs
- SubclassTypeValidator.cs
- GlyphTypeface.cs
- AssemblyAttributes.cs
- Bold.cs
- DialogBaseForm.cs
- _SafeNetHandles.cs
- PropertyIDSet.cs
- ProfileModule.cs
- WindowsScrollBar.cs
- Helpers.cs
- COM2ICategorizePropertiesHandler.cs
- CodeExpressionStatement.cs
- ServicePointManager.cs
- ListViewAutomationPeer.cs
- PathSegmentCollection.cs
- Package.cs
- DataControlFieldCollection.cs
- DbMetaDataFactory.cs
- AnnotationAdorner.cs
- CustomErrorsSection.cs
- _WinHttpWebProxyDataBuilder.cs
- CollaborationHelperFunctions.cs
- DataAdapter.cs
- ChildTable.cs
- AccessKeyManager.cs
- CustomValidator.cs
- GB18030Encoding.cs
- SmiRequestExecutor.cs
- ISAPIApplicationHost.cs
- ModelItemImpl.cs
- PTConverter.cs
- SiteMapProvider.cs
- ping.cs
- CodeGotoStatement.cs
- HttpApplicationFactory.cs
- oledbmetadatacolumnnames.cs
- OutKeywords.cs
- SafeRightsManagementSessionHandle.cs
- COM2EnumConverter.cs
- httpapplicationstate.cs
- SrgsElementFactoryCompiler.cs
- FileLogRecord.cs
- AlternationConverter.cs
- NameValueConfigurationElement.cs
- QueryCursorEventArgs.cs
- WarningException.cs
- PtsHost.cs
- xamlnodes.cs
- BinaryObjectReader.cs
- Int32EqualityComparer.cs
- Properties.cs
- UserControlBuildProvider.cs
- TextEditorThreadLocalStore.cs
- XamlStream.cs
- TagPrefixCollection.cs
- NavigatorOutput.cs
- COM2ColorConverter.cs
- Stopwatch.cs
- NavigatorInvalidBodyAccessException.cs
- ActivityMarkupSerializer.cs
- PowerModeChangedEventArgs.cs
- ExpressionVisitorHelpers.cs
- Validator.cs