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
- DateBoldEvent.cs
- WebPartUserCapability.cs
- NextPreviousPagerField.cs
- MouseEventArgs.cs
- StaticTextPointer.cs
- SelectiveScrollingGrid.cs
- BindingContext.cs
- DescendantQuery.cs
- DetailsViewInsertEventArgs.cs
- PersistNameAttribute.cs
- OptionalColumn.cs
- CompilationUnit.cs
- SessionStateModule.cs
- LogConverter.cs
- FocusWithinProperty.cs
- MethodCallTranslator.cs
- AttachInfo.cs
- Light.cs
- DelayedRegex.cs
- PackageRelationshipSelector.cs
- TextStore.cs
- DBAsyncResult.cs
- returneventsaver.cs
- XmlCodeExporter.cs
- PropertyTabAttribute.cs
- LiteralTextParser.cs
- MsmqHostedTransportManager.cs
- RepeaterItem.cs
- Command.cs
- AssemblyName.cs
- DependencyObjectPropertyDescriptor.cs
- SplineKeyFrames.cs
- SingleKeyFrameCollection.cs
- ReachSerializer.cs
- EasingKeyFrames.cs
- HttpCacheVaryByContentEncodings.cs
- ModifierKeysConverter.cs
- XamlPointCollectionSerializer.cs
- SchemaNotation.cs
- FunctionQuery.cs
- Symbol.cs
- CalendarButton.cs
- UserInitiatedRoutedEventPermissionAttribute.cs
- X509Certificate.cs
- EpmContentDeSerializerBase.cs
- DataGridViewTextBoxColumn.cs
- RegexCode.cs
- indexingfiltermarshaler.cs
- UnknownBitmapDecoder.cs
- BidOverLoads.cs
- _NegoState.cs
- Setter.cs
- WebPartAddingEventArgs.cs
- RenderingEventArgs.cs
- XmlSchemaInferenceException.cs
- AuthenticationException.cs
- HWStack.cs
- TextShapeableCharacters.cs
- CompilerResults.cs
- CommonXSendMessage.cs
- AuthenticatedStream.cs
- PerformanceCounterManager.cs
- CompoundFileIOPermission.cs
- SafeSecurityHandles.cs
- MarkupObject.cs
- XmlUrlResolver.cs
- BamlTreeUpdater.cs
- Focus.cs
- DynamicArgumentDesigner.xaml.cs
- IOThreadTimer.cs
- CompilerWrapper.cs
- OperationFormatUse.cs
- DecimalStorage.cs
- BaseServiceProvider.cs
- MetadataCacheItem.cs
- TransactionManager.cs
- WebConfigurationHostFileChange.cs
- Ipv6Element.cs
- ArrayTypeMismatchException.cs
- XmlImplementation.cs
- FileResponseElement.cs
- ImpersonateTokenRef.cs
- PhysicalAddress.cs
- SafeFileMapViewHandle.cs
- validation.cs
- Wrapper.cs
- InternalPermissions.cs
- RectAnimationUsingKeyFrames.cs
- CellParagraph.cs
- Transform3D.cs
- EntityContainerEmitter.cs
- LockCookie.cs
- ContentControl.cs
- EditorZone.cs
- MinMaxParagraphWidth.cs
- WorkflowInstanceQuery.cs
- ToolStripSeparatorRenderEventArgs.cs
- ConfigurationPropertyCollection.cs
- HttpListenerException.cs
- GeometryGroup.cs