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
- _NTAuthentication.cs
- TableCellsCollectionEditor.cs
- InputScope.cs
- ComponentConverter.cs
- ClientProxyGenerator.cs
- LinkTarget.cs
- Opcode.cs
- XmlNotation.cs
- MinMaxParagraphWidth.cs
- StringUtil.cs
- CodeChecksumPragma.cs
- IconEditor.cs
- AppSettingsReader.cs
- PartialArray.cs
- HotSpot.cs
- DataChangedEventManager.cs
- figurelength.cs
- ASCIIEncoding.cs
- Membership.cs
- SqlTrackingService.cs
- WaitingCursor.cs
- DictionaryBase.cs
- ControlTemplate.cs
- ScrollBarAutomationPeer.cs
- CfgArc.cs
- ProfileElement.cs
- _OSSOCK.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- DmlSqlGenerator.cs
- Executor.cs
- XmlSchemaRedefine.cs
- AsymmetricKeyExchangeDeformatter.cs
- XmlDataImplementation.cs
- RequestCache.cs
- SerializableAttribute.cs
- CollectionViewGroupInternal.cs
- RouteParameter.cs
- StrongNameUtility.cs
- SmiSettersStream.cs
- SqlDataSourceCustomCommandPanel.cs
- LambdaCompiler.Generated.cs
- XmlSchemaValidationException.cs
- StatusBarDrawItemEvent.cs
- Int32RectValueSerializer.cs
- InstanceOwnerException.cs
- EventRouteFactory.cs
- LinkedResourceCollection.cs
- DrawingContextWalker.cs
- InstanceCreationEditor.cs
- COM2IManagedPerPropertyBrowsingHandler.cs
- SizeConverter.cs
- DataGridSortCommandEventArgs.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- InvokePatternIdentifiers.cs
- TypeElement.cs
- XmlDocument.cs
- HeaderCollection.cs
- XmlSchemaAnyAttribute.cs
- BinaryMessageEncodingElement.cs
- ErrorProvider.cs
- CultureInfoConverter.cs
- DataBindingExpressionBuilder.cs
- Graph.cs
- ArrayElementGridEntry.cs
- DataStorage.cs
- XmlDataSourceNodeDescriptor.cs
- AddInBase.cs
- DoubleLinkListEnumerator.cs
- JsonQueryStringConverter.cs
- SecUtil.cs
- Resources.Designer.cs
- WebWorkflowRole.cs
- HttpContext.cs
- MarginsConverter.cs
- SystemIPAddressInformation.cs
- RectAnimationClockResource.cs
- XamlSerializerUtil.cs
- HtmlInputPassword.cs
- HttpCacheVary.cs
- RunWorkerCompletedEventArgs.cs
- StyleCollection.cs
- XmlDesignerDataSourceView.cs
- SoapWriter.cs
- InlinedLocationReference.cs
- WebPartTransformerAttribute.cs
- ApplicationBuildProvider.cs
- Matrix3D.cs
- DetailsViewRow.cs
- CustomBindingElement.cs
- EventLogPermissionAttribute.cs
- CodeSnippetTypeMember.cs
- ThreadBehavior.cs
- DecodeHelper.cs
- IisTraceWebEventProvider.cs
- VSWCFServiceContractGenerator.cs
- ComponentDispatcher.cs
- CardSpacePolicyElement.cs
- DotExpr.cs
- RepeaterItemCollection.cs
- Perspective.cs