Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Input / Stylus / StylusButtonCollection.cs / 1305600 / StylusButtonCollection.cs
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
using System;
using System.Windows;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Windows.Media;
using MS.Utility;
using MS.Internal;
using SR = MS.Internal.PresentationCore.SR;
using SRID = MS.Internal.PresentationCore.SRID;
namespace System.Windows.Input
{
/////////////////////////////////////////////////////////////////////////
///
/// Collection of the stylus devices that are available on the tablet.
///
public class StylusButtonCollection : ReadOnlyCollection
{
/////////////////////////////////////////////////////////////////////
internal StylusButtonCollection(StylusButton[] buttons)
: base(new List(buttons))
{
}
///
/// Returns the first StylusButton in the collection with a Guid property
/// that matches the specified guid. Returns null if no matching StylusButton is found
///
/// guid
public StylusButton GetStylusButtonByGuid(Guid guid)
{
for (int x = 0; x < this.Count; x++)
{
if (this[x].Guid == guid)
{
return this[x];
}
}
return null;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
using System;
using System.Windows;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Windows.Media;
using MS.Utility;
using MS.Internal;
using SR = MS.Internal.PresentationCore.SR;
using SRID = MS.Internal.PresentationCore.SRID;
namespace System.Windows.Input
{
/////////////////////////////////////////////////////////////////////////
///
/// Collection of the stylus devices that are available on the tablet.
///
public class StylusButtonCollection : ReadOnlyCollection
{
/////////////////////////////////////////////////////////////////////
internal StylusButtonCollection(StylusButton[] buttons)
: base(new List(buttons))
{
}
///
/// Returns the first StylusButton in the collection with a Guid property
/// that matches the specified guid. Returns null if no matching StylusButton is found
///
/// guid
public StylusButton GetStylusButtonByGuid(Guid guid)
{
for (int x = 0; x < this.Count; x++)
{
if (this[x].Guid == guid)
{
return this[x];
}
}
return null;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PropertyKey.cs
- FramingFormat.cs
- RtfToXamlLexer.cs
- MarginsConverter.cs
- CancelRequestedQuery.cs
- RuleInfoComparer.cs
- HTMLTagNameToTypeMapper.cs
- SqlDataSourceStatusEventArgs.cs
- HttpResponseHeader.cs
- List.cs
- FixedHighlight.cs
- ObjectListCommandEventArgs.cs
- RankException.cs
- RuntimeComponentFilter.cs
- DocumentGridPage.cs
- BypassElementCollection.cs
- SecurityAttributeGenerationHelper.cs
- CompilerParameters.cs
- XmlSchemaCollection.cs
- BinaryConverter.cs
- BuilderInfo.cs
- PixelFormatConverter.cs
- WebPartsPersonalizationAuthorization.cs
- WebContext.cs
- CapabilitiesAssignment.cs
- Region.cs
- DesignTimeValidationFeature.cs
- StructuralType.cs
- WebBaseEventKeyComparer.cs
- SchemaEntity.cs
- CommandField.cs
- FormsAuthenticationTicket.cs
- ListViewTableCell.cs
- DataGridViewRowCancelEventArgs.cs
- ExportFileRequest.cs
- ProxyGenerationError.cs
- StorageMappingFragment.cs
- PublisherIdentityPermission.cs
- MdImport.cs
- ToolboxItemFilterAttribute.cs
- translator.cs
- Positioning.cs
- RadioButtonList.cs
- BindToObject.cs
- ServiceConfigurationTraceRecord.cs
- GatewayDefinition.cs
- StateManagedCollection.cs
- CharAnimationBase.cs
- InvalidOleVariantTypeException.cs
- Transactions.cs
- OracleDataAdapter.cs
- XmlSchemas.cs
- ComponentChangedEvent.cs
- DataSourceXmlSerializer.cs
- FixedHyperLink.cs
- StrokeCollectionConverter.cs
- PropertyPathWorker.cs
- StyleHelper.cs
- OracleParameterCollection.cs
- PageAction.cs
- TdsParserSessionPool.cs
- EntityClientCacheEntry.cs
- ParserStreamGeometryContext.cs
- ContentType.cs
- Setter.cs
- EpmContentSerializerBase.cs
- HexParser.cs
- Dictionary.cs
- HandlerBase.cs
- OrderingInfo.cs
- ToolboxDataAttribute.cs
- DocumentEventArgs.cs
- UnsafeNativeMethods.cs
- GeometryConverter.cs
- ScriptingWebServicesSectionGroup.cs
- DataKey.cs
- XmlElementCollection.cs
- TagPrefixInfo.cs
- MimePart.cs
- Timeline.cs
- ButtonFieldBase.cs
- SchemaEntity.cs
- ContactManager.cs
- AnimationClock.cs
- ObjectNavigationPropertyMapping.cs
- ServiceParser.cs
- Options.cs
- StringCollectionMarkupSerializer.cs
- ConsoleKeyInfo.cs
- Label.cs
- Main.cs
- CustomCredentialPolicy.cs
- Point3DAnimationBase.cs
- SessionEndedEventArgs.cs
- InternalCache.cs
- XmlSchemaAttribute.cs
- HelpEvent.cs
- MediaCommands.cs
- TypedRowHandler.cs
- TextChangedEventArgs.cs