Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / System / Windows / Input / Stylus / StylusPointProperty.cs / 1 / StylusPointProperty.cs
//------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------- using System; using System.Windows; using System.Windows.Input; using System.Globalization; using System.Windows.Media; using System.Collections.Generic; using SR = MS.Internal.PresentationCore.SR; using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { ////// StylusPointProperty /// public class StylusPointProperty { ////// Instance data /// private Guid _id; private bool _isButton; ////// StylusPointProperty /// /// identifier /// isButton public StylusPointProperty(Guid identifier, bool isButton) { Initialize(identifier, isButton); } ////// StylusPointProperty /// /// ///Protected - used by the StylusPointPropertyInfo ctor protected StylusPointProperty(StylusPointProperty stylusPointProperty) { if (null == stylusPointProperty) { throw new ArgumentNullException("stylusPointProperty"); } Initialize(stylusPointProperty.Id, stylusPointProperty.IsButton); } ////// Common ctor helper /// /// identifier /// isButton private void Initialize(Guid identifier, bool isButton) { // // validate isButton for known guids // if (StylusPointPropertyIds.IsKnownButton(identifier)) { if (!isButton) { //error, this is a known button throw new ArgumentException(SR.Get(SRID.InvalidIsButtonForId), "isButton"); } } else { if (StylusPointPropertyIds.IsKnownId(identifier) && isButton) { //error, this is a known guid that is NOT a button throw new ArgumentException(SR.Get(SRID.InvalidIsButtonForId2), "isButton"); } } _id = identifier; _isButton = isButton; } ////// Id /// public Guid Id { get { return _id; } } ////// IsButton /// public bool IsButton { get { return _isButton; } } ////// Returns a human readable string representation /// public override string ToString() { return "{Id=" + StylusPointPropertyIds.GetStringRepresentation(_id) + ", IsButton=" + _isButton.ToString(CultureInfo.InvariantCulture) + "}"; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ControlUtil.cs
- ToolStripProgressBar.cs
- DataControlCommands.cs
- TableProvider.cs
- StyleSelector.cs
- AuthorizationRuleCollection.cs
- SystemIPv4InterfaceProperties.cs
- ObjectQueryState.cs
- Rfc2898DeriveBytes.cs
- Message.cs
- ExceptionUtil.cs
- TraceContext.cs
- DesignerVerbCollection.cs
- EventDriven.cs
- RootProfilePropertySettingsCollection.cs
- AssemblyAttributesGoHere.cs
- ModelUIElement3D.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- ListenerSessionConnectionReader.cs
- Win32.cs
- GAC.cs
- ConfigurationValue.cs
- NodeFunctions.cs
- ExtensionQuery.cs
- KeyValuePairs.cs
- OdbcStatementHandle.cs
- ShaderEffect.cs
- RenderDataDrawingContext.cs
- CharacterBuffer.cs
- SyndicationDeserializer.cs
- DiscoveryDocumentSearchPattern.cs
- HighContrastHelper.cs
- XmlCharCheckingWriter.cs
- BinaryQueryOperator.cs
- PackageRelationshipCollection.cs
- OdbcHandle.cs
- MetadataPropertyAttribute.cs
- Grid.cs
- ObjectDataSourceView.cs
- ExtentJoinTreeNode.cs
- StylusPointPropertyId.cs
- HttpCapabilitiesSectionHandler.cs
- StringUtil.cs
- XmlCollation.cs
- xsdvalidator.cs
- CollectionBase.cs
- ParseNumbers.cs
- TemplateLookupAction.cs
- Tile.cs
- PerformanceCounterPermissionAttribute.cs
- WebServiceFaultDesigner.cs
- TextElement.cs
- OpenTypeCommon.cs
- XmlElementAttributes.cs
- CircleHotSpot.cs
- SecurityPermission.cs
- LicenseManager.cs
- Tracer.cs
- LinkButton.cs
- _BasicClient.cs
- RadioButtonDesigner.cs
- RegexRunner.cs
- ScrollItemPattern.cs
- RenderData.cs
- CollectionDataContract.cs
- X509ChainPolicy.cs
- FileSecurity.cs
- ScriptingRoleServiceSection.cs
- AutoResetEvent.cs
- Crypto.cs
- RadioButtonBaseAdapter.cs
- PathFigureCollection.cs
- SecurityContext.cs
- ToggleProviderWrapper.cs
- ZipFileInfo.cs
- NetworkCredential.cs
- Pair.cs
- DrawTreeNodeEventArgs.cs
- ProxyWebPart.cs
- graph.cs
- thaishape.cs
- MouseWheelEventArgs.cs
- FontDialog.cs
- ActivitySurrogate.cs
- Part.cs
- SessionStateItemCollection.cs
- AddressHeaderCollectionElement.cs
- HandledEventArgs.cs
- EventOpcode.cs
- UnsignedPublishLicense.cs
- Module.cs
- ConstraintManager.cs
- Subordinate.cs
- PixelShader.cs
- OleDbPermission.cs
- DataGridViewAddColumnDialog.cs
- GregorianCalendarHelper.cs
- NonVisualControlAttribute.cs
- RelatedImageListAttribute.cs
- CodeAccessSecurityEngine.cs