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
- TableLayoutPanelCellPosition.cs
- StylusPointPropertyId.cs
- CodeParameterDeclarationExpressionCollection.cs
- ProfileInfo.cs
- ObjectCache.cs
- BooleanExpr.cs
- DbExpressionVisitor.cs
- SchemaSetCompiler.cs
- ToolStripOverflow.cs
- HitTestWithGeometryDrawingContextWalker.cs
- MaterialGroup.cs
- IdentityValidationException.cs
- FontSizeConverter.cs
- ipaddressinformationcollection.cs
- ParameterInfo.cs
- SyndicationDeserializer.cs
- GCHandleCookieTable.cs
- MaterialGroup.cs
- SingleAnimationBase.cs
- BitFlagsGenerator.cs
- TypeForwardedToAttribute.cs
- SecuritySessionServerSettings.cs
- base64Transforms.cs
- XmlBoundElement.cs
- WinCategoryAttribute.cs
- AutoCompleteStringCollection.cs
- FactoryId.cs
- ComboBox.cs
- ParserStreamGeometryContext.cs
- ResourcesGenerator.cs
- SQlBooleanStorage.cs
- StreamWriter.cs
- HttpDigestClientCredential.cs
- ServiceHttpModule.cs
- SqlInternalConnectionTds.cs
- ArglessEventHandlerProxy.cs
- ListControl.cs
- TypeSource.cs
- MailAddress.cs
- StrokeSerializer.cs
- CompModSwitches.cs
- DllNotFoundException.cs
- FolderLevelBuildProviderAppliesToAttribute.cs
- LineServicesCallbacks.cs
- ZoneLinkButton.cs
- DefaultShape.cs
- Baml2006ReaderContext.cs
- Int32Converter.cs
- ObjectViewEntityCollectionData.cs
- __Filters.cs
- ControlParameter.cs
- ArrayElementGridEntry.cs
- InstanceHandleReference.cs
- JapaneseCalendar.cs
- PreviewPageInfo.cs
- DataServiceQuery.cs
- MailAddress.cs
- SiblingIterators.cs
- LongAverageAggregationOperator.cs
- BuildProviderCollection.cs
- SizeKeyFrameCollection.cs
- ZoneLinkButton.cs
- XmlWriterSettings.cs
- SetMemberBinder.cs
- ProtectedConfiguration.cs
- AlternateView.cs
- ConstraintStruct.cs
- BuildResultCache.cs
- SuppressIldasmAttribute.cs
- LineGeometry.cs
- Crc32.cs
- Helper.cs
- ItemCollection.cs
- DesignTimeVisibleAttribute.cs
- ProgressBarRenderer.cs
- PropertyNames.cs
- MetadataItemSerializer.cs
- ContentFileHelper.cs
- Literal.cs
- Int32Converter.cs
- ErrorView.xaml.cs
- PasswordTextContainer.cs
- StatusBar.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- WebConfigurationHost.cs
- NativeRightsManagementAPIsStructures.cs
- InputBindingCollection.cs
- AutomationPatternInfo.cs
- FreezableCollection.cs
- FrameworkElementFactory.cs
- Point3DCollection.cs
- ChangeInterceptorAttribute.cs
- DateTimeConverter.cs
- XmlSerializationReader.cs
- FormViewDeletedEventArgs.cs
- ComponentCollection.cs
- Int64Storage.cs
- RecipientInfo.cs
- OracleDateTime.cs
- Quack.cs