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
- LayoutExceptionEventArgs.cs
- RichTextBoxDesigner.cs
- DataGridTextBoxColumn.cs
- TimeoutValidationAttribute.cs
- FixUpCollection.cs
- EventLogPermissionEntry.cs
- MainMenu.cs
- VectorConverter.cs
- TypeReference.cs
- Security.cs
- UnmanagedMemoryStreamWrapper.cs
- NamespaceDecl.cs
- Form.cs
- InternalTypeHelper.cs
- PenCursorManager.cs
- HeaderCollection.cs
- ToolStripContentPanel.cs
- DispatchWrapper.cs
- EntityStoreSchemaGenerator.cs
- ProxyGenerationError.cs
- EdmItemError.cs
- UInt32Converter.cs
- GlobalItem.cs
- BinaryParser.cs
- ToolStripItemTextRenderEventArgs.cs
- ResourceDictionaryCollection.cs
- OneOfConst.cs
- DispatcherOperation.cs
- EnumerableRowCollectionExtensions.cs
- XmlArrayItemAttributes.cs
- ErrorFormatter.cs
- AssertUtility.cs
- GridViewCommandEventArgs.cs
- LineSegment.cs
- ParserStreamGeometryContext.cs
- EventLogEntry.cs
- SortAction.cs
- SendMailErrorEventArgs.cs
- TimeSpanMinutesConverter.cs
- DataViewSettingCollection.cs
- WindowsSspiNegotiation.cs
- MoveSizeWinEventHandler.cs
- CellParaClient.cs
- XPathArrayIterator.cs
- DocumentPageTextView.cs
- ResourceContainer.cs
- Highlights.cs
- DrawingContextDrawingContextWalker.cs
- WsatEtwTraceListener.cs
- SectionRecord.cs
- FormViewRow.cs
- ImageFormat.cs
- XmlSchemaSimpleTypeList.cs
- Lease.cs
- InnerItemCollectionView.cs
- StructuredType.cs
- FileIOPermission.cs
- WebScriptMetadataMessage.cs
- FixedBufferAttribute.cs
- AbsoluteQuery.cs
- BigInt.cs
- SqlDependencyUtils.cs
- CodePageEncoding.cs
- HtmlTableCellCollection.cs
- TraceFilter.cs
- DataPagerFieldItem.cs
- HttpApplicationStateWrapper.cs
- IListConverters.cs
- BlobPersonalizationState.cs
- ElementProxy.cs
- DataControlFieldHeaderCell.cs
- BindingExpressionBase.cs
- XPathException.cs
- EntityCommandDefinition.cs
- MailAddress.cs
- Cell.cs
- InstanceStore.cs
- _NegotiateClient.cs
- Point3DValueSerializer.cs
- GridSplitterAutomationPeer.cs
- SimpleExpression.cs
- DockPattern.cs
- Base64Encoder.cs
- CodeRegionDirective.cs
- GeneralTransform3D.cs
- TablePatternIdentifiers.cs
- DataGridrowEditEndingEventArgs.cs
- TrackingParameters.cs
- IndexerNameAttribute.cs
- SafeFindHandle.cs
- MessageHeaderException.cs
- OverflowException.cs
- DataSvcMapFileSerializer.cs
- FrameDimension.cs
- OperandQuery.cs
- COMException.cs
- ToolStripLabel.cs
- UdpDiscoveryMessageFilter.cs
- ObjectItemCollection.cs
- _ProxyChain.cs