Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / System / Windows / Input / Stylus / StylusButton.cs / 1 / 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
- HtmlInputControl.cs
- FormatControl.cs
- SourceElementsCollection.cs
- TransformPatternIdentifiers.cs
- TryExpression.cs
- EditingCoordinator.cs
- IDictionary.cs
- HttpCapabilitiesSectionHandler.cs
- TableCellCollection.cs
- ToolStripSeparatorRenderEventArgs.cs
- AttachedAnnotation.cs
- UnsafeNativeMethodsTablet.cs
- ExceptionHelpers.cs
- Button.cs
- PolyBezierSegment.cs
- NameValueFileSectionHandler.cs
- XmlResolver.cs
- TdsParserStateObject.cs
- MeshGeometry3D.cs
- AssemblyResourceLoader.cs
- UrlMappingsSection.cs
- StateManagedCollection.cs
- SizeAnimationClockResource.cs
- UpdatePanelControlTrigger.cs
- SmiContextFactory.cs
- TreeViewEvent.cs
- PackageDigitalSignature.cs
- MatrixIndependentAnimationStorage.cs
- EffectiveValueEntry.cs
- StylusDevice.cs
- Types.cs
- GridViewSelectEventArgs.cs
- WebPartEditorOkVerb.cs
- KoreanCalendar.cs
- BlurBitmapEffect.cs
- TextDpi.cs
- WebConfigurationManager.cs
- ObjectReaderCompiler.cs
- ObjectAnimationBase.cs
- EventRecord.cs
- DockEditor.cs
- DataGridViewColumnCollection.cs
- DomainConstraint.cs
- infer.cs
- WebConfigurationHostFileChange.cs
- ImageAnimator.cs
- SystemUdpStatistics.cs
- CaseInsensitiveOrdinalStringComparer.cs
- EntityStoreSchemaFilterEntry.cs
- BoundField.cs
- SqlDependencyListener.cs
- ButtonDesigner.cs
- XPathBinder.cs
- View.cs
- SafeRightsManagementEnvironmentHandle.cs
- TransformerTypeCollection.cs
- SqlRewriteScalarSubqueries.cs
- NetTcpBindingCollectionElement.cs
- ListBase.cs
- LineSegment.cs
- MailSettingsSection.cs
- ApplicationTrust.cs
- unitconverter.cs
- IPAddressCollection.cs
- Msec.cs
- RegisteredDisposeScript.cs
- MouseActionValueSerializer.cs
- SchemaObjectWriter.cs
- followingquery.cs
- HtmlInputSubmit.cs
- DoubleKeyFrameCollection.cs
- EntityUtil.cs
- ErrorLog.cs
- HttpProfileBase.cs
- SimpleFieldTemplateUserControl.cs
- CodeBlockBuilder.cs
- BoundsDrawingContextWalker.cs
- TriState.cs
- LicenseProviderAttribute.cs
- Error.cs
- XmlSchemaProviderAttribute.cs
- Helpers.cs
- DocumentSequenceHighlightLayer.cs
- UnsafeNativeMethods.cs
- HashHelpers.cs
- X509ChainPolicy.cs
- BinaryMessageEncodingBindingElement.cs
- ImageDrawing.cs
- NativeRightsManagementAPIsStructures.cs
- FrameworkObject.cs
- SslSecurityTokenParameters.cs
- ComboBoxRenderer.cs
- ScaleTransform3D.cs
- X509Extension.cs
- MatchAttribute.cs
- MeasureData.cs
- ConfigXmlElement.cs
- XmlSchemaParticle.cs
- RequiredFieldValidator.cs
- DataGridViewColumnCollection.cs