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
- Debug.cs
- SqlDataSourceSelectingEventArgs.cs
- ClientSponsor.cs
- SyndicationContent.cs
- TimerEventSubscription.cs
- SByteConverter.cs
- ProviderSettings.cs
- LOSFormatter.cs
- GroupBoxAutomationPeer.cs
- ClientScriptManagerWrapper.cs
- TextBox.cs
- Normalizer.cs
- OracleParameterCollection.cs
- ArrayElementGridEntry.cs
- Deflater.cs
- ToolboxDataAttribute.cs
- PriorityChain.cs
- Header.cs
- DataGridViewColumnConverter.cs
- ValueOfAction.cs
- NativeMethods.cs
- UnknownBitmapDecoder.cs
- Annotation.cs
- FormatterConverter.cs
- FullTextState.cs
- DataControlField.cs
- DesignerGenericWebPart.cs
- AssociationTypeEmitter.cs
- X509Certificate2.cs
- PcmConverter.cs
- HttpModuleCollection.cs
- NoClickablePointException.cs
- XmlSchemaComplexContentRestriction.cs
- XPathExpr.cs
- XmlSchemaExternal.cs
- StandardBindingElement.cs
- LinkedList.cs
- AmbientLight.cs
- Context.cs
- SqlFacetAttribute.cs
- StorageInfo.cs
- PropertyToken.cs
- MenuItemBindingCollection.cs
- WindowsButton.cs
- ProtocolsConfiguration.cs
- MobileTextWriter.cs
- AttributeProviderAttribute.cs
- DropTarget.cs
- ChildrenQuery.cs
- CompilerState.cs
- TabPageDesigner.cs
- WebColorConverter.cs
- _OSSOCK.cs
- TemplateManager.cs
- TemplateInstanceAttribute.cs
- TemplateBindingExpression.cs
- WaitHandleCannotBeOpenedException.cs
- MenuItem.cs
- TemplateParser.cs
- ToolStripDropDownItem.cs
- HandlerFactoryCache.cs
- TokenBasedSet.cs
- PropertyGridView.cs
- EncodingFallbackAwareXmlTextWriter.cs
- SQlBooleanStorage.cs
- ProcessMessagesAsyncResult.cs
- DPTypeDescriptorContext.cs
- AuthenticationSection.cs
- arc.cs
- CodeMethodInvokeExpression.cs
- SecurityPolicySection.cs
- GroupLabel.cs
- _TransmitFileOverlappedAsyncResult.cs
- WeakEventTable.cs
- SelectionHighlightInfo.cs
- SrgsSubset.cs
- XmlSchemaAnnotation.cs
- RequestUriProcessor.cs
- ConfigurationProperty.cs
- StorageEndPropertyMapping.cs
- wgx_render.cs
- GridViewColumnHeader.cs
- Zone.cs
- IntersectQueryOperator.cs
- CounterSet.cs
- FunctionParameter.cs
- ThicknessAnimation.cs
- DataListItem.cs
- BehaviorEditorPart.cs
- EdmType.cs
- LineServices.cs
- ObjectView.cs
- HtmlFormWrapper.cs
- ProcessModuleCollection.cs
- ProjectionPathBuilder.cs
- ConfigXmlText.cs
- BaseTemplateParser.cs
- ListBindableAttribute.cs
- BamlLocalizableResourceKey.cs
- Debug.cs