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
- EdgeModeValidation.cs
- PagedDataSource.cs
- TypeUtil.cs
- ItemDragEvent.cs
- ToolStripDropDownItem.cs
- Animatable.cs
- ExpressionBinding.cs
- compensatingcollection.cs
- Rfc2898DeriveBytes.cs
- CapabilitiesAssignment.cs
- ISFTagAndGuidCache.cs
- WorkflowDebuggerSteppingAttribute.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- HatchBrush.cs
- BooleanFunctions.cs
- DocumentXPathNavigator.cs
- GridItemProviderWrapper.cs
- StorageFunctionMapping.cs
- DataBoundControl.cs
- HtmlButton.cs
- DetailsViewRowCollection.cs
- FixUp.cs
- SolidBrush.cs
- PrivacyNoticeElement.cs
- COM2PropertyDescriptor.cs
- MarkupCompilePass2.cs
- DoubleAverageAggregationOperator.cs
- LocalsItemDescription.cs
- Switch.cs
- DBConcurrencyException.cs
- XmlSchemaAnnotated.cs
- BufferBuilder.cs
- MouseGestureValueSerializer.cs
- WorkflowServiceOperationListItem.cs
- SevenBitStream.cs
- RadioButtonList.cs
- Geometry.cs
- HijriCalendar.cs
- ProvidersHelper.cs
- _LocalDataStore.cs
- CodeExpressionCollection.cs
- AppDomain.cs
- SymDocumentType.cs
- TextRangeBase.cs
- HtmlLinkAdapter.cs
- EnumerableCollectionView.cs
- SecurityRuntime.cs
- HostedTcpTransportManager.cs
- XmlTextReaderImpl.cs
- IncrementalHitTester.cs
- ThrowHelper.cs
- DictionaryBase.cs
- RawStylusInputCustomDataList.cs
- ScriptingWebServicesSectionGroup.cs
- Cast.cs
- ResXBuildProvider.cs
- CurrencyWrapper.cs
- CodeRemoveEventStatement.cs
- UndoManager.cs
- ReadWriteControlDesigner.cs
- InternalControlCollection.cs
- SqlDataSourceQuery.cs
- Deserializer.cs
- DebugHandleTracker.cs
- DelegateCompletionCallbackWrapper.cs
- Cell.cs
- ConfigXmlText.cs
- PopupControlService.cs
- DebugHandleTracker.cs
- PersonalizationDictionary.cs
- XPathNavigatorKeyComparer.cs
- HtmlMobileTextWriter.cs
- Exceptions.cs
- AttributeInfo.cs
- CompileXomlTask.cs
- safelink.cs
- DefaultPrintController.cs
- GeometryHitTestResult.cs
- HighlightComponent.cs
- ContainsRowNumberChecker.cs
- FontFamilyIdentifier.cs
- IxmlLineInfo.cs
- basevalidator.cs
- ConfigXmlText.cs
- FrameworkTextComposition.cs
- Condition.cs
- AnnotationHelper.cs
- QilVisitor.cs
- WebPart.cs
- CodeLinePragma.cs
- WorkflowDesigner.cs
- LookupNode.cs
- UnionCodeGroup.cs
- VirtualPathProvider.cs
- TraceRecords.cs
- CopyAction.cs
- AstTree.cs
- DataServiceProcessingPipeline.cs
- JsonDeserializer.cs
- BitmapEffectState.cs