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
- DebugController.cs
- InlineCollection.cs
- AccessText.cs
- SchemaEntity.cs
- ICspAsymmetricAlgorithm.cs
- DataGridViewLinkColumn.cs
- BitStream.cs
- BinaryObjectInfo.cs
- TableLayoutCellPaintEventArgs.cs
- TableLayoutSettingsTypeConverter.cs
- SecurityCriticalDataForSet.cs
- HwndMouseInputProvider.cs
- ColumnMapTranslator.cs
- Brush.cs
- XmlElementCollection.cs
- PersonalizationProviderHelper.cs
- ServiceModelActivationSectionGroup.cs
- SynchronizationContext.cs
- ObjectQueryExecutionPlan.cs
- LocalValueEnumerator.cs
- StringWriter.cs
- RightsManagementPermission.cs
- AdornedElementPlaceholder.cs
- DbParameterCollectionHelper.cs
- DataTableClearEvent.cs
- EncodingInfo.cs
- ReferenceEqualityComparer.cs
- TableItemPattern.cs
- Error.cs
- SoapServerProtocol.cs
- OwnerDrawPropertyBag.cs
- ToolStripDropDownMenu.cs
- PropertyIDSet.cs
- SymmetricAlgorithm.cs
- DataServiceResponse.cs
- CloseCryptoHandleRequest.cs
- ControlCodeDomSerializer.cs
- PlaceHolder.cs
- FileChangeNotifier.cs
- ResourceContainer.cs
- SoapConverter.cs
- DataServiceQuery.cs
- CompilerError.cs
- DefaultEvaluationContext.cs
- SafeThemeHandle.cs
- Compiler.cs
- NetworkAddressChange.cs
- ConstructorExpr.cs
- TcpWorkerProcess.cs
- NavigationProperty.cs
- HtmlGenericControl.cs
- WindowHideOrCloseTracker.cs
- CapabilitiesRule.cs
- XsdDuration.cs
- Stackframe.cs
- SmiEventStream.cs
- LayoutSettings.cs
- InkCanvas.cs
- SingleAnimation.cs
- MdImport.cs
- MetabaseReader.cs
- MouseButton.cs
- HeaderCollection.cs
- storepermissionattribute.cs
- Rss20FeedFormatter.cs
- AdPostCacheSubstitution.cs
- CodeValidator.cs
- SqlSupersetValidator.cs
- COM2ExtendedBrowsingHandler.cs
- BitmapSourceSafeMILHandle.cs
- Literal.cs
- DataGridLength.cs
- ButtonChrome.cs
- DataGridTextBox.cs
- TypeDescriptionProviderAttribute.cs
- ReadOnlyObservableCollection.cs
- DBCSCodePageEncoding.cs
- TraceHandler.cs
- OleDbCommandBuilder.cs
- EventHandlersStore.cs
- PrintControllerWithStatusDialog.cs
- SoapAttributeOverrides.cs
- ProcessModuleCollection.cs
- SecureEnvironment.cs
- PermissionSetEnumerator.cs
- CurrentChangedEventManager.cs
- HtmlTableCellCollection.cs
- Version.cs
- ProvidersHelper.cs
- Function.cs
- Metafile.cs
- GrammarBuilderPhrase.cs
- FontStretches.cs
- NetworkInformationPermission.cs
- DataListItemCollection.cs
- DrawingGroup.cs
- HttpServerVarsCollection.cs
- ToolStripItemEventArgs.cs
- TraceRecord.cs
- ThreadLocal.cs