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
- Helpers.cs
- Button.cs
- IgnoreFlushAndCloseStream.cs
- ValidationRule.cs
- TrustManagerPromptUI.cs
- AdCreatedEventArgs.cs
- DataGridToolTip.cs
- TranslateTransform.cs
- ContentIterators.cs
- ExtensionDataReader.cs
- WSFederationHttpBinding.cs
- cryptoapiTransform.cs
- MembershipPasswordException.cs
- SiteMap.cs
- FixedHyperLink.cs
- BinaryFormatterWriter.cs
- ping.cs
- Converter.cs
- MsmqIntegrationProcessProtocolHandler.cs
- UrlPropertyAttribute.cs
- ZipPackagePart.cs
- CachedFontFace.cs
- ProgressBar.cs
- XamlSerializationHelper.cs
- FunctionImportElement.cs
- fixedPageContentExtractor.cs
- DispatcherHooks.cs
- TextAnchor.cs
- AddInServer.cs
- DataColumnChangeEvent.cs
- AssemblySettingAttributes.cs
- BigInt.cs
- PauseStoryboard.cs
- TraceContextEventArgs.cs
- TrustLevel.cs
- EditorPartChrome.cs
- VarRemapper.cs
- UDPClient.cs
- TypeDescriptorContext.cs
- Encoding.cs
- SetIterators.cs
- BinaryWriter.cs
- Wildcard.cs
- CodeConstructor.cs
- CompositeTypefaceMetrics.cs
- WebColorConverter.cs
- LineVisual.cs
- RewritingProcessor.cs
- Permission.cs
- EventPropertyMap.cs
- NotFiniteNumberException.cs
- DataKeyCollection.cs
- DataServiceHostFactory.cs
- EncryptedKey.cs
- UdpChannelListener.cs
- IteratorFilter.cs
- Int16AnimationBase.cs
- _HeaderInfo.cs
- DataRelationPropertyDescriptor.cs
- DiscardableAttribute.cs
- FileFormatException.cs
- PolyBezierSegment.cs
- StylusCollection.cs
- PropertyMetadata.cs
- ImageClickEventArgs.cs
- indexingfiltermarshaler.cs
- ComponentCollection.cs
- ReachDocumentPageSerializerAsync.cs
- SqlTypesSchemaImporter.cs
- PolicyException.cs
- FlowLayoutPanel.cs
- SHA384Managed.cs
- RichTextBox.cs
- InkCanvasFeedbackAdorner.cs
- XmlQueryOutput.cs
- LockedActivityGlyph.cs
- TypefaceMetricsCache.cs
- CanonicalizationDriver.cs
- AutoResetEvent.cs
- CodeTryCatchFinallyStatement.cs
- CfgArc.cs
- DataGridViewEditingControlShowingEventArgs.cs
- EmptyEnumerable.cs
- HwndSourceKeyboardInputSite.cs
- HttpFileCollection.cs
- ListViewCancelEventArgs.cs
- StateMachineSubscription.cs
- SynchronizationContext.cs
- ColumnClickEvent.cs
- RPIdentityRequirement.cs
- AliasedSlot.cs
- BuildTopDownAttribute.cs
- Animatable.cs
- ToolStripContentPanel.cs
- MetadataItem.cs
- ContractHandle.cs
- RubberbandSelector.cs
- BitmapMetadataEnumerator.cs
- ExecutionScope.cs
- NavigatorInput.cs