Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / 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. using System; using System.Globalization; namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// /// name of the tablet /// 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
- SectionRecord.cs
- CommandBindingCollection.cs
- UnmanagedBitmapWrapper.cs
- RefreshPropertiesAttribute.cs
- DesignerTextBoxAdapter.cs
- UniformGrid.cs
- ClusterRegistryConfigurationProvider.cs
- RijndaelCryptoServiceProvider.cs
- AuthorizationRuleCollection.cs
- MethodImplAttribute.cs
- ButtonChrome.cs
- AspNetSynchronizationContext.cs
- ServiceHostFactory.cs
- Journaling.cs
- PermissionSetEnumerator.cs
- CompareValidator.cs
- WorkflowViewManager.cs
- safelink.cs
- StructuralObject.cs
- EntityViewGenerationAttribute.cs
- TypeRefElement.cs
- X509RecipientCertificateClientElement.cs
- CodeLinePragma.cs
- UserInitiatedRoutedEventPermission.cs
- ScriptDescriptor.cs
- KerberosTicketHashIdentifierClause.cs
- DetailsViewInsertedEventArgs.cs
- WebPartExportVerb.cs
- WebPartChrome.cs
- Matrix.cs
- HScrollProperties.cs
- XhtmlConformanceSection.cs
- TextDecorationUnitValidation.cs
- NavigatorOutput.cs
- ConfigurationValidatorBase.cs
- HtmlHead.cs
- XmlSchemaAttribute.cs
- SpeechSynthesizer.cs
- Mapping.cs
- GridViewPageEventArgs.cs
- PersonalizationAdministration.cs
- EmptyEnumerable.cs
- SiteMapNodeCollection.cs
- WebPartManagerInternals.cs
- MemoryMappedFileSecurity.cs
- ZipIOLocalFileDataDescriptor.cs
- SerialPinChanges.cs
- DrawingCollection.cs
- MarkupWriter.cs
- OpCodes.cs
- IQueryable.cs
- AdCreatedEventArgs.cs
- TextRangeBase.cs
- EnumConverter.cs
- HtmlControlPersistable.cs
- IsolatedStorageException.cs
- EventHandlersStore.cs
- SoapIgnoreAttribute.cs
- CodeRemoveEventStatement.cs
- dataprotectionpermissionattribute.cs
- Soap.cs
- EntityDataSourceReferenceGroup.cs
- SHA384.cs
- ParenExpr.cs
- ExpressionBuilderCollection.cs
- NTAccount.cs
- MaxValueConverter.cs
- PrePrepareMethodAttribute.cs
- DbProviderFactories.cs
- BitSet.cs
- GridPatternIdentifiers.cs
- DependsOnAttribute.cs
- HtmlContainerControl.cs
- XmlCountingReader.cs
- SamlAttributeStatement.cs
- TextElementEditingBehaviorAttribute.cs
- DelimitedListTraceListener.cs
- ConfigurationPermission.cs
- Sorting.cs
- MissingMethodException.cs
- WithParamAction.cs
- OleDbSchemaGuid.cs
- PropVariant.cs
- ListView.cs
- MetadataArtifactLoaderFile.cs
- CollectionViewSource.cs
- OutOfProcStateClientManager.cs
- XmlSchemaRedefine.cs
- ScrollViewerAutomationPeer.cs
- ReadOnlyDataSourceView.cs
- SessionState.cs
- ContentPlaceHolderDesigner.cs
- TransactionalPackage.cs
- ExpressionTextBox.xaml.cs
- WebEvents.cs
- BuildProviderCollection.cs
- Size3DValueSerializer.cs
- tibetanshape.cs
- DelayedRegex.cs
- ContainerAction.cs