Code:
/ 4.0 / 4.0 / untmp / 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. name of the tablet
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DesignBindingPropertyDescriptor.cs
- FixedStringLookup.cs
- MetadataArtifactLoaderResource.cs
- TransactionManager.cs
- EmbeddedObject.cs
- Operators.cs
- RuntimeResourceSet.cs
- XamlBrushSerializer.cs
- DataPagerCommandEventArgs.cs
- ContextMenu.cs
- SyntaxCheck.cs
- SByteConverter.cs
- CollaborationHelperFunctions.cs
- login.cs
- CanonicalizationDriver.cs
- Debug.cs
- HashCodeCombiner.cs
- UnitySerializationHolder.cs
- AVElementHelper.cs
- WindowsAltTab.cs
- DeferredReference.cs
- PerformanceCounter.cs
- RequestQueryParser.cs
- InstanceOwnerException.cs
- SqlDependencyListener.cs
- SHA384.cs
- OneToOneMappingSerializer.cs
- TimeSpanStorage.cs
- XpsViewerException.cs
- HttpSessionStateBase.cs
- Italic.cs
- DrawingBrush.cs
- FileLoadException.cs
- XmlSchemaAttributeGroupRef.cs
- BamlResourceDeserializer.cs
- SaveFileDialog.cs
- Size.cs
- CompilerTypeWithParams.cs
- EditorPart.cs
- XsdValidatingReader.cs
- SpinWait.cs
- ProxyGenerator.cs
- XamlStyleSerializer.cs
- Convert.cs
- PolyLineSegment.cs
- XmlSchemaRedefine.cs
- EastAsianLunisolarCalendar.cs
- SendMessageChannelCache.cs
- RightsManagementLicense.cs
- EnumUnknown.cs
- Reference.cs
- ArithmeticException.cs
- AttributeEmitter.cs
- TokenizerHelper.cs
- HttpRuntimeSection.cs
- PageThemeParser.cs
- MatchAttribute.cs
- QueryCacheKey.cs
- NavigatorOutput.cs
- FlowLayoutSettings.cs
- ProfilePropertyNameValidator.cs
- PathFigureCollectionValueSerializer.cs
- SmtpException.cs
- WebPartEditVerb.cs
- IdnMapping.cs
- XmlBaseWriter.cs
- OracleInfoMessageEventArgs.cs
- TagMapInfo.cs
- SqlDataSourceQuery.cs
- ExpressionPrinter.cs
- HttpCookiesSection.cs
- ProcessStartInfo.cs
- CounterSampleCalculator.cs
- TypeGenericEnumerableViewSchema.cs
- QilScopedVisitor.cs
- BuilderInfo.cs
- FileVersionInfo.cs
- XmlWrappingReader.cs
- XmlC14NWriter.cs
- ParallelDesigner.cs
- DBCommand.cs
- SoapException.cs
- EventSchemaTraceListener.cs
- X509PeerCertificateAuthenticationElement.cs
- ContentPropertyAttribute.cs
- TypeConstant.cs
- WindowsListView.cs
- InstancePersistenceCommandException.cs
- PropertyKey.cs
- InputScopeAttribute.cs
- KnownTypeAttribute.cs
- ImageListUtils.cs
- CheckBox.cs
- MenuItemAutomationPeer.cs
- EqualityComparer.cs
- OleDbMetaDataFactory.cs
- WindowsRegion.cs
- TemplateKey.cs
- ApplicationFileParser.cs
- XmlNodeChangedEventArgs.cs