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
- ConfigXmlSignificantWhitespace.cs
- SerializationException.cs
- TrackPoint.cs
- OptimizerPatterns.cs
- ISAPIRuntime.cs
- FileStream.cs
- ItemCollection.cs
- CompensateDesigner.cs
- Compiler.cs
- DockPatternIdentifiers.cs
- FlowLayout.cs
- DefaultValidator.cs
- Pair.cs
- XPathPatternParser.cs
- EntityContainerRelationshipSet.cs
- IISUnsafeMethods.cs
- AuthenticatingEventArgs.cs
- SecurityHeaderLayout.cs
- FixedElement.cs
- NotificationContext.cs
- SqlDataSourceView.cs
- Selector.cs
- BoundColumn.cs
- CompilerGeneratedAttribute.cs
- DocumentSequenceHighlightLayer.cs
- Animatable.cs
- DataGridViewEditingControlShowingEventArgs.cs
- EncoderParameter.cs
- SizeChangedInfo.cs
- FunctionNode.cs
- GC.cs
- CorrelationScope.cs
- FontSourceCollection.cs
- RecognizedAudio.cs
- ActivityCodeGenerator.cs
- DataServiceQueryProvider.cs
- ToolStripControlHost.cs
- Operand.cs
- QilLoop.cs
- TextServicesCompartmentEventSink.cs
- TreeViewDesigner.cs
- IIS7UserPrincipal.cs
- Vector.cs
- WMICapabilities.cs
- DataGridViewDataConnection.cs
- FindCriteriaCD1.cs
- DesignerEventService.cs
- SplineKeyFrames.cs
- RuleSetReference.cs
- ListControl.cs
- BasicKeyConstraint.cs
- CustomErrorCollection.cs
- Parameter.cs
- PersianCalendar.cs
- XmlSchemaAnnotated.cs
- DataGridAddNewRow.cs
- XpsInterleavingPolicy.cs
- StatusBar.cs
- SafeRegistryHandle.cs
- PageAsyncTaskManager.cs
- SafeRegistryKey.cs
- IsolatedStorageFile.cs
- WindowsListViewItem.cs
- MatrixTransform.cs
- LZCodec.cs
- LeaseManager.cs
- DistributedTransactionPermission.cs
- EventSourceCreationData.cs
- Dictionary.cs
- SoapClientMessage.cs
- ClientSettingsProvider.cs
- EncryptedReference.cs
- ExpressionParser.cs
- UpdatePanel.cs
- ImageCodecInfoPrivate.cs
- TextPattern.cs
- QueryRelOp.cs
- RTLAwareMessageBox.cs
- SafeRegistryHandle.cs
- DoubleStorage.cs
- PersonalizableAttribute.cs
- WebPartAddingEventArgs.cs
- QuotedPrintableStream.cs
- rsa.cs
- HtmlTextArea.cs
- CodeGenerator.cs
- OverrideMode.cs
- CheckBox.cs
- MatrixConverter.cs
- TypeExtension.cs
- TcpTransportBindingElement.cs
- SafeCancelMibChangeNotify.cs
- InternalControlCollection.cs
- AnonymousIdentificationModule.cs
- FeatureSupport.cs
- InkCanvasInnerCanvas.cs
- AutoScrollExpandMessageFilter.cs
- QuaternionKeyFrameCollection.cs
- TypedRowGenerator.cs
- RequestCachingSection.cs