Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Input / Stylus / Tablet.cs / 1305600 / 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
- EntityException.cs
- EntitySqlQueryState.cs
- WindowsListViewItemStartMenu.cs
- TPLETWProvider.cs
- ToolStripPanelRenderEventArgs.cs
- EdmMember.cs
- XmlAttributeHolder.cs
- LostFocusEventManager.cs
- InkCanvasSelection.cs
- XamlToRtfWriter.cs
- EndpointConfigContainer.cs
- SiteOfOriginPart.cs
- BaseValidatorDesigner.cs
- Baml2006ReaderFrame.cs
- FileRecordSequence.cs
- ToolboxItemFilterAttribute.cs
- ResourceFallbackManager.cs
- TextDecorationCollection.cs
- GenericTextProperties.cs
- LinqDataSourceValidationException.cs
- ipaddressinformationcollection.cs
- IMembershipProvider.cs
- ParagraphResult.cs
- ResponseStream.cs
- SkipQueryOptionExpression.cs
- figurelength.cs
- ProfileServiceManager.cs
- MonitoringDescriptionAttribute.cs
- EdmItemCollection.cs
- TextBoxRenderer.cs
- MinimizableAttributeTypeConverter.cs
- PackWebRequestFactory.cs
- DescendantQuery.cs
- printdlgexmarshaler.cs
- ApplicationHost.cs
- DataGridViewCellConverter.cs
- DiagnosticTraceSource.cs
- SqlProviderServices.cs
- ListDependantCardsRequest.cs
- SqlSelectStatement.cs
- NullableLongAverageAggregationOperator.cs
- SqlComparer.cs
- UrlAuthorizationModule.cs
- ConfigurationManagerInternalFactory.cs
- Crc32.cs
- PageRanges.cs
- HighlightComponent.cs
- ConnectionStringEditor.cs
- SettingsContext.cs
- QilReference.cs
- Storyboard.cs
- Image.cs
- StrongNamePublicKeyBlob.cs
- SerializationObjectManager.cs
- SchemaObjectWriter.cs
- PolyQuadraticBezierSegment.cs
- IssuanceTokenProviderState.cs
- SystemIPGlobalStatistics.cs
- TextDecoration.cs
- SpellerError.cs
- Material.cs
- WindowsAuthenticationModule.cs
- Queue.cs
- MachineKeySection.cs
- PasswordRecovery.cs
- FormsAuthenticationConfiguration.cs
- PageBreakRecord.cs
- CategoryGridEntry.cs
- Dump.cs
- EDesignUtil.cs
- TextEndOfParagraph.cs
- Int32Collection.cs
- FamilyTypeface.cs
- SerialPort.cs
- IxmlLineInfo.cs
- CopyNamespacesAction.cs
- versioninfo.cs
- ConvertersCollection.cs
- Utils.cs
- SharedStatics.cs
- AuthorizationRule.cs
- TemplateBaseAction.cs
- ItemContainerProviderWrapper.cs
- Cursor.cs
- RetrieveVirtualItemEventArgs.cs
- WebPartMenu.cs
- CompiledWorkflowDefinitionContext.cs
- OracleConnectionString.cs
- StreamedWorkflowDefinitionContext.cs
- Int64Storage.cs
- EntityFunctions.cs
- WindowsTreeView.cs
- ZipFileInfo.cs
- HttpFileCollection.cs
- BaseTemplateBuildProvider.cs
- StorageComplexTypeMapping.cs
- Behavior.cs
- Relationship.cs
- TextReader.cs
- RemotingAttributes.cs