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
- CompositeFontParser.cs
- DataFormat.cs
- AccessDataSource.cs
- WindowsRichEdit.cs
- ContractMethodParameterInfo.cs
- Semaphore.cs
- DependencySource.cs
- Calendar.cs
- PropertyTab.cs
- SingleResultAttribute.cs
- MbpInfo.cs
- xsdvalidator.cs
- TraceHandlerErrorFormatter.cs
- SchemaCreator.cs
- StorageMappingFragment.cs
- CfgArc.cs
- TextHidden.cs
- dsa.cs
- Delegate.cs
- PlainXmlSerializer.cs
- SizeChangedEventArgs.cs
- SoundPlayer.cs
- TypeLoadException.cs
- HebrewNumber.cs
- EncryptedPackage.cs
- CompositeScriptReference.cs
- InkSerializer.cs
- RectAnimationClockResource.cs
- WebServiceClientProxyGenerator.cs
- Ray3DHitTestResult.cs
- SortKey.cs
- GraphicsState.cs
- PersonalizationStateInfoCollection.cs
- LazyTextWriterCreator.cs
- RemoteHelper.cs
- DoWorkEventArgs.cs
- Page.cs
- InvalidOleVariantTypeException.cs
- Int32AnimationUsingKeyFrames.cs
- StreamGeometry.cs
- SqlBulkCopyColumnMapping.cs
- SpecialFolderEnumConverter.cs
- AppendHelper.cs
- StyleReferenceConverter.cs
- ConfigurationErrorsException.cs
- SQLChars.cs
- AttributeQuery.cs
- CodeBinaryOperatorExpression.cs
- QueryStringParameter.cs
- NumericUpDownAccelerationCollection.cs
- Tokenizer.cs
- __Filters.cs
- BaseAsyncResult.cs
- TypeGenericEnumerableViewSchema.cs
- InfoCardClaim.cs
- GetWinFXPath.cs
- CodeIdentifiers.cs
- FontDifferentiator.cs
- StructuralObject.cs
- ObjectQueryExecutionPlan.cs
- DoubleAnimation.cs
- DesignTimeTemplateParser.cs
- InvokeWebServiceDesigner.cs
- TraceEventCache.cs
- NumericPagerField.cs
- Header.cs
- ValueQuery.cs
- PointConverter.cs
- DataMemberConverter.cs
- SvcMapFileSerializer.cs
- ContentOnlyMessage.cs
- LineVisual.cs
- XmlQueryTypeFactory.cs
- TextParagraphProperties.cs
- DataRecord.cs
- DataObjectAttribute.cs
- CachedFontFace.cs
- MethodBody.cs
- XslException.cs
- CqlLexerHelpers.cs
- _DisconnectOverlappedAsyncResult.cs
- HandledMouseEvent.cs
- UnmanagedBitmapWrapper.cs
- ReliableMessagingHelpers.cs
- GeneralTransform3DCollection.cs
- MailMessage.cs
- TextServicesLoader.cs
- DataGrid.cs
- EdmSchemaError.cs
- ArraySortHelper.cs
- IntMinMaxAggregationOperator.cs
- MessageTransmitTraceRecord.cs
- ExpressionBuilder.cs
- DispatcherFrame.cs
- PolicyFactory.cs
- Behavior.cs
- FormatException.cs
- EntitySqlQueryCacheEntry.cs
- _NetworkingPerfCounters.cs
- XmlAttributeAttribute.cs