Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Input / Stylus / StylusButton.cs / 1305600 / StylusButton.cs
using System; using System.Globalization; namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// ////// StylusButton class /// public class StylusButton { ///////////////////////////////////////////////////////////////////// internal StylusButton(string name, Guid id) { _name = name; _guid = id; } ///////////////////////////////////////////////////////////////////// ////// Returns the hardware Guid of the StylusDevice button. /// public Guid Guid { get { return _guid; } } ///////////////////////////////////////////////////////////////////// ////// Returns the current state of the button. /// public StylusButtonState StylusButtonState { // get { StylusPointCollection stylusPoints = StylusDevice.GetStylusPoints(null); if (stylusPoints == null || stylusPoints.Count == 0) return CachedButtonState; return (StylusButtonState)stylusPoints[stylusPoints.Count - 1].GetPropertyValue(new StylusPointProperty(Guid, true)); } } internal StylusButtonState CachedButtonState { get { return _cachedButtonState; } set { _cachedButtonState = value; } } ///////////////////////////////////////////////////////////////////// ////// Returns the name of the button. /// public string Name { get { return _name; } } ///////////////////////////////////////////////////////////////////// ////// Returns StylusDevice object that owns this button. /// public StylusDevice StylusDevice { get { return _stylusDevice; } } ///////////////////////////////////////////////////////////////////// /// internal void SetOwner(StylusDevice stylusDevice) { _stylusDevice = stylusDevice; } ///////////////////////////////////////////////////////////////////// ////// Returns the friendly representation of the button object /// ///public override string ToString() { return String.Format(CultureInfo.CurrentCulture, "{0}({1})", base.ToString(), this.Name); } ///////////////////////////////////////////////////////////////////// StylusDevice _stylusDevice; string _name; Guid _guid; StylusButtonState _cachedButtonState = StylusButtonState.Up; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.Globalization; namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// /// name of the tablet /// StylusButton class /// public class StylusButton { ///////////////////////////////////////////////////////////////////// internal StylusButton(string name, Guid id) { _name = name; _guid = id; } ///////////////////////////////////////////////////////////////////// ////// Returns the hardware Guid of the StylusDevice button. /// public Guid Guid { get { return _guid; } } ///////////////////////////////////////////////////////////////////// ////// Returns the current state of the button. /// public StylusButtonState StylusButtonState { // get { StylusPointCollection stylusPoints = StylusDevice.GetStylusPoints(null); if (stylusPoints == null || stylusPoints.Count == 0) return CachedButtonState; return (StylusButtonState)stylusPoints[stylusPoints.Count - 1].GetPropertyValue(new StylusPointProperty(Guid, true)); } } internal StylusButtonState CachedButtonState { get { return _cachedButtonState; } set { _cachedButtonState = value; } } ///////////////////////////////////////////////////////////////////// ////// Returns the name of the button. /// public string Name { get { return _name; } } ///////////////////////////////////////////////////////////////////// ////// Returns StylusDevice object that owns this button. /// public StylusDevice StylusDevice { get { return _stylusDevice; } } ///////////////////////////////////////////////////////////////////// /// internal void SetOwner(StylusDevice stylusDevice) { _stylusDevice = stylusDevice; } ///////////////////////////////////////////////////////////////////// ////// Returns the friendly representation of the button object /// ///public override string ToString() { return String.Format(CultureInfo.CurrentCulture, "{0}({1})", base.ToString(), this.Name); } ///////////////////////////////////////////////////////////////////// StylusDevice _stylusDevice; string _name; Guid _guid; StylusButtonState _cachedButtonState = StylusButtonState.Up; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. name of the tablet
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- bindurihelper.cs
- OLEDB_Util.cs
- XPathScanner.cs
- ProtocolsConfigurationEntry.cs
- KeyEvent.cs
- Axis.cs
- ComponentGuaranteesAttribute.cs
- DataGridViewTextBoxEditingControl.cs
- DBConnectionString.cs
- DeferredTextReference.cs
- VirtualDirectoryMapping.cs
- ScriptComponentDescriptor.cs
- UIElement.cs
- EventRoute.cs
- MsmqIntegrationBindingElement.cs
- ProfilePropertySettings.cs
- UDPClient.cs
- LayoutUtils.cs
- ClientTarget.cs
- MenuCommands.cs
- TypeSource.cs
- StylusDownEventArgs.cs
- DeadCharTextComposition.cs
- DictionaryTraceRecord.cs
- CollectionViewSource.cs
- MessageEventSubscriptionService.cs
- AuthorizationPolicyTypeElement.cs
- DataGridViewCellCancelEventArgs.cs
- LinqDataView.cs
- MsmqTransportBindingElement.cs
- EventProvider.cs
- WebBrowserNavigatedEventHandler.cs
- PointCollection.cs
- SqlClientMetaDataCollectionNames.cs
- DataGridViewRowCollection.cs
- GradientStop.cs
- SkinIDTypeConverter.cs
- ResXBuildProvider.cs
- ZipIOLocalFileHeader.cs
- ConfigurationPropertyAttribute.cs
- ChannelFactoryRefCache.cs
- ToolStripPanel.cs
- HtmlCommandAdapter.cs
- TextParagraphCache.cs
- complextypematerializer.cs
- BinarySerializer.cs
- StyleBamlRecordReader.cs
- ToolZoneDesigner.cs
- PhysicalOps.cs
- PixelShader.cs
- SchemaImporter.cs
- ComponentResourceKey.cs
- SourceLocation.cs
- precedingsibling.cs
- InputScope.cs
- Vector3DValueSerializer.cs
- SelectionPattern.cs
- TypeGeneratedEventArgs.cs
- DataViewManager.cs
- DebugInfoGenerator.cs
- Internal.cs
- SuppressMergeCheckAttribute.cs
- UpdatePanel.cs
- SystemFonts.cs
- CodeDomSerializerBase.cs
- ServiceReference.cs
- Message.cs
- DataRecordInternal.cs
- SurrogateChar.cs
- contentDescriptor.cs
- WSHttpBinding.cs
- CharAnimationBase.cs
- ConfigurationPropertyAttribute.cs
- CombinedGeometry.cs
- ExceptionTrace.cs
- SecureStringHasher.cs
- ConfigurationSettings.cs
- cookie.cs
- RegularExpressionValidator.cs
- PropertyMapper.cs
- AmbientProperties.cs
- NonPrimarySelectionGlyph.cs
- OperationContextScope.cs
- TextContainerChangedEventArgs.cs
- ActivityUtilities.cs
- ReferenceEqualityComparer.cs
- SqlRewriteScalarSubqueries.cs
- SamlAssertionKeyIdentifierClause.cs
- Int32CAMarshaler.cs
- BuildProvider.cs
- SystemTcpConnection.cs
- XmlAttributeAttribute.cs
- WorkflowRequestContext.cs
- AssociationEndMember.cs
- TextDocumentView.cs
- IntSecurity.cs
- HttpListener.cs
- UpdatableGenericsFeature.cs
- Pkcs9Attribute.cs
- AnnotationResourceCollection.cs