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
- TextEffect.cs
- HostingPreferredMapPath.cs
- KoreanCalendar.cs
- EntityDataSourceDesignerHelper.cs
- Clock.cs
- SlipBehavior.cs
- CommonDialog.cs
- ReachDocumentReferenceCollectionSerializer.cs
- FormatVersion.cs
- XmlQualifiedName.cs
- UniqueConstraint.cs
- SharedStatics.cs
- XPathPatternParser.cs
- BaseDataList.cs
- EditorPartChrome.cs
- ResumeStoryboard.cs
- OrthographicCamera.cs
- Border.cs
- SelectingProviderEventArgs.cs
- ProbeMatchesMessageCD1.cs
- Viewport2DVisual3D.cs
- File.cs
- OutputWindow.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- printdlgexmarshaler.cs
- TypeKeyValue.cs
- CodeDomExtensionMethods.cs
- NavigationCommands.cs
- HtmlTernaryTree.cs
- SspiSafeHandles.cs
- unsafenativemethodsother.cs
- Sequence.cs
- IndexedString.cs
- OdbcUtils.cs
- ReadOnlyActivityGlyph.cs
- PassportAuthenticationModule.cs
- SafeNativeMethodsCLR.cs
- HtmlAnchor.cs
- X509PeerCertificateElement.cs
- Padding.cs
- SqlFlattener.cs
- Point3DCollectionConverter.cs
- MethodImplAttribute.cs
- storepermission.cs
- SqlStream.cs
- DiscriminatorMap.cs
- RegexBoyerMoore.cs
- PropertyPathWorker.cs
- RectKeyFrameCollection.cs
- SmtpReplyReaderFactory.cs
- _UriTypeConverter.cs
- Int16AnimationBase.cs
- odbcmetadatacolumnnames.cs
- ThousandthOfEmRealDoubles.cs
- LinkClickEvent.cs
- RadioButton.cs
- StatusBar.cs
- NotifyParentPropertyAttribute.cs
- BrowserCapabilitiesFactoryBase.cs
- GeneratedCodeAttribute.cs
- autovalidator.cs
- ListItem.cs
- ContentPropertyAttribute.cs
- WebResourceAttribute.cs
- DataServiceRequestException.cs
- ListView.cs
- EncoderBestFitFallback.cs
- SystemIcmpV6Statistics.cs
- HtmlInputReset.cs
- ContourSegment.cs
- ContextMarshalException.cs
- NamedObject.cs
- TextMetrics.cs
- DataGridViewCellValidatingEventArgs.cs
- GenericEnumerator.cs
- ListBindingHelper.cs
- ConvertersCollection.cs
- OneOf.cs
- DataGridColumnCollection.cs
- XmlILAnnotation.cs
- FixedSOMTableCell.cs
- ToolboxItemWrapper.cs
- ValidatorCompatibilityHelper.cs
- FixedHyperLink.cs
- DbProviderConfigurationHandler.cs
- DataRowView.cs
- DependencyPropertyKey.cs
- ButtonStandardAdapter.cs
- WebServiceMethodData.cs
- SimplePropertyEntry.cs
- MyContact.cs
- securestring.cs
- SqlConnectionString.cs
- PrintEvent.cs
- ReferenceService.cs
- LeftCellWrapper.cs
- OleDbMetaDataFactory.cs
- DecimalSumAggregationOperator.cs
- FontEditor.cs
- TraceLevelHelper.cs