Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- StreamHelper.cs
- BindingElement.cs
- FieldCollectionEditor.cs
- ContainerSelectorGlyph.cs
- StickyNote.cs
- EnglishPluralizationService.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- SqlConnectionPoolGroupProviderInfo.cs
- ApplicationGesture.cs
- DataServiceProcessingPipeline.cs
- FigureParagraph.cs
- Exception.cs
- TimerEventSubscriptionCollection.cs
- EdmToObjectNamespaceMap.cs
- Stream.cs
- TaskCanceledException.cs
- AspNetSynchronizationContext.cs
- NameValuePair.cs
- AsyncPostBackErrorEventArgs.cs
- PrimaryKeyTypeConverter.cs
- SchemaExporter.cs
- ToolStrip.cs
- MailWebEventProvider.cs
- LinearGradientBrush.cs
- MdiWindowListItemConverter.cs
- ObjectAssociationEndMapping.cs
- PluralizationService.cs
- TranslateTransform.cs
- sqlpipe.cs
- BitmapInitialize.cs
- EntityAdapter.cs
- SoapSchemaImporter.cs
- OutputCache.cs
- TextOnlyOutput.cs
- InternalPolicyElement.cs
- ScriptRegistrationManager.cs
- HScrollBar.cs
- ImagingCache.cs
- SystemResources.cs
- DataTrigger.cs
- SpnegoTokenProvider.cs
- PageTheme.cs
- DeviceSpecificDialogCachedState.cs
- EdmFunctionAttribute.cs
- SolidColorBrush.cs
- GetRecipientRequest.cs
- InvalidFilterCriteriaException.cs
- PresentationSource.cs
- _FtpControlStream.cs
- PasswordPropertyTextAttribute.cs
- DetailsViewRow.cs
- DescendantQuery.cs
- ArgumentValidation.cs
- FileUpload.cs
- SecurityElement.cs
- ScalarType.cs
- Aggregates.cs
- UiaCoreTypesApi.cs
- DataGrid.cs
- ValidationHelper.cs
- DataIdProcessor.cs
- WpfSharedBamlSchemaContext.cs
- DesignerCategoryAttribute.cs
- PropertyConverter.cs
- PackWebResponse.cs
- HandlerMappingMemo.cs
- GACMembershipCondition.cs
- XmlNullResolver.cs
- Int32AnimationUsingKeyFrames.cs
- TraceContext.cs
- ResourcePool.cs
- EditCommandColumn.cs
- RemotingHelper.cs
- CodeExpressionStatement.cs
- ResourceReader.cs
- Convert.cs
- HealthMonitoringSection.cs
- Point.cs
- OleDbWrapper.cs
- PerformanceCounterCategory.cs
- TokenBasedSetEnumerator.cs
- NavigationWindowAutomationPeer.cs
- X509Certificate.cs
- CustomValidator.cs
- SharedRuntimeState.cs
- TaskHelper.cs
- DiffuseMaterial.cs
- WebPartConnectionsCancelEventArgs.cs
- PopupControlService.cs
- SqlXml.cs
- RtfToXamlReader.cs
- _AutoWebProxyScriptHelper.cs
- StylusPointPropertyUnit.cs
- DPAPIProtectedConfigurationProvider.cs
- DataTrigger.cs
- PreloadedPackages.cs
- HyperLinkStyle.cs
- Columns.cs
- WebPartManager.cs
- Configuration.cs