Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Input / Stylus / StylusPointProperty.cs / 1305600 / 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
- SettingsProviderCollection.cs
- BindingNavigator.cs
- ObjectListFieldsPage.cs
- GroupByQueryOperator.cs
- ReversePositionQuery.cs
- DesignerGenericWebPart.cs
- DynamicResourceExtensionConverter.cs
- DictionaryEntry.cs
- NamespaceInfo.cs
- TextServicesDisplayAttributePropertyRanges.cs
- RijndaelManagedTransform.cs
- ProxyHelper.cs
- OAVariantLib.cs
- FontFamilyValueSerializer.cs
- Operand.cs
- OdbcRowUpdatingEvent.cs
- IntSecurity.cs
- PersonalizationProvider.cs
- Gdiplus.cs
- SqlConnectionFactory.cs
- MenuStrip.cs
- HttpValueCollection.cs
- Exceptions.cs
- SortDescription.cs
- StreamWriter.cs
- TextPointerBase.cs
- Timer.cs
- HeaderedContentControl.cs
- MethodResolver.cs
- Encoder.cs
- Substitution.cs
- InstalledFontCollection.cs
- DesignerOptionService.cs
- RepeaterItem.cs
- WorkflowInstance.cs
- PanelStyle.cs
- ControlEvent.cs
- DataBoundControlAdapter.cs
- HighContrastHelper.cs
- HttpRuntime.cs
- ProtocolElement.cs
- EventBookmark.cs
- SafeFileMapViewHandle.cs
- GrammarBuilderBase.cs
- FrugalList.cs
- CodeCastExpression.cs
- PointAnimationBase.cs
- ElapsedEventArgs.cs
- TemplatedWizardStep.cs
- ResourcesBuildProvider.cs
- _HeaderInfo.cs
- ToolStripItemEventArgs.cs
- TripleDESCryptoServiceProvider.cs
- BitmapInitialize.cs
- InternalCache.cs
- HtmlInputSubmit.cs
- ErrorRuntimeConfig.cs
- Image.cs
- UpdatePanelTrigger.cs
- ThreadAbortException.cs
- CriticalHandle.cs
- PointValueSerializer.cs
- DataProtectionSecurityStateEncoder.cs
- WizardPanel.cs
- IdentifierService.cs
- ServerValidateEventArgs.cs
- HttpContext.cs
- BindingValueChangedEventArgs.cs
- XPathDocumentNavigator.cs
- DSASignatureDeformatter.cs
- Animatable.cs
- PropertyGeneratedEventArgs.cs
- SecurityContext.cs
- ListViewTableCell.cs
- Light.cs
- TdsParserStateObject.cs
- DetailsViewInsertedEventArgs.cs
- ReliableSessionBindingElement.cs
- SystemIPAddressInformation.cs
- IIS7WorkerRequest.cs
- StorageRoot.cs
- XmlSchemaAll.cs
- TextElement.cs
- TimeZone.cs
- TriggerActionCollection.cs
- DbInsertCommandTree.cs
- RegexWorker.cs
- AsymmetricCryptoHandle.cs
- AnnotationMap.cs
- InputEventArgs.cs
- ToolStripEditorManager.cs
- BreakRecordTable.cs
- ConcurrentBag.cs
- DbConnectionPoolIdentity.cs
- UnsafeNativeMethods.cs
- GridItemProviderWrapper.cs
- WorkflowRuntime.cs
- Rotation3DAnimationBase.cs
- CheckableControlBaseAdapter.cs
- ClickablePoint.cs