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
- IntMinMaxAggregationOperator.cs
- EntitySqlQueryCacheKey.cs
- SchemaAttDef.cs
- WebPartCancelEventArgs.cs
- FontWeightConverter.cs
- MonthCalendar.cs
- ValidatedControlConverter.cs
- Message.cs
- metadatamappinghashervisitor.cs
- DbProviderFactoriesConfigurationHandler.cs
- Base64Encoder.cs
- MediaSystem.cs
- XmlValidatingReaderImpl.cs
- FastEncoderWindow.cs
- httpapplicationstate.cs
- BmpBitmapDecoder.cs
- IgnoreDeviceFilterElement.cs
- ColorConverter.cs
- SvcMapFileLoader.cs
- DataGridViewButtonColumn.cs
- UpdateCommand.cs
- HttpDebugHandler.cs
- WebPermission.cs
- SecureStringHasher.cs
- AstTree.cs
- FrugalMap.cs
- StdValidatorsAndConverters.cs
- ExtenderProvidedPropertyAttribute.cs
- SessionIDManager.cs
- MarginsConverter.cs
- TypeListConverter.cs
- DrawingContextWalker.cs
- ExtractorMetadata.cs
- CryptoStream.cs
- SinglePageViewer.cs
- XsltArgumentList.cs
- SafeCryptoHandles.cs
- GroupedContextMenuStrip.cs
- SystemException.cs
- SerializerProvider.cs
- PageAsyncTask.cs
- ThreadPool.cs
- DateTimeStorage.cs
- OlePropertyStructs.cs
- OracleParameter.cs
- uribuilder.cs
- WorkflowServiceNamespace.cs
- FilterException.cs
- XmlSchemaSubstitutionGroup.cs
- CompositeDataBoundControl.cs
- XmlEventCache.cs
- TagNameToTypeMapper.cs
- Stacktrace.cs
- LinqExpressionNormalizer.cs
- BindingsCollection.cs
- VariableExpressionConverter.cs
- DesignerForm.cs
- FrameworkElement.cs
- TraceContextRecord.cs
- PropertyPathWorker.cs
- CodeTypeOfExpression.cs
- ToolStripLabel.cs
- HandlerBase.cs
- DefaultBinder.cs
- TreeViewItem.cs
- XmlSerializableWriter.cs
- Int32Converter.cs
- ImageClickEventArgs.cs
- StateDesigner.CommentLayoutGlyph.cs
- Point4DValueSerializer.cs
- RegexCompiler.cs
- TableLayoutStyle.cs
- EventRoute.cs
- EditorAttribute.cs
- XmlChildNodes.cs
- TypeElement.cs
- DbCommandDefinition.cs
- PaintValueEventArgs.cs
- Propagator.ExtentPlaceholderCreator.cs
- RegexStringValidator.cs
- ZipIOBlockManager.cs
- ConcurrentStack.cs
- RepeatButton.cs
- AddingNewEventArgs.cs
- SurrogateEncoder.cs
- TitleStyle.cs
- ReferencedCollectionType.cs
- StateMachineDesignerPaint.cs
- AsymmetricSignatureDeformatter.cs
- ProxyWebPartConnectionCollection.cs
- Evidence.cs
- Keywords.cs
- LayoutEvent.cs
- EncodingInfo.cs
- DesignConnection.cs
- DataGridViewLinkCell.cs
- MaterializeFromAtom.cs
- AutomationIdentifier.cs
- Container.cs
- DragDeltaEventArgs.cs