Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / textformatting / MinMaxParagraphWidth.cs / 1305600 / MinMaxParagraphWidth.cs
//------------------------------------------------------------------------ // // Microsoft Windows Client Platform // Copyright (C) Microsoft Corporation, 2004 // // File: MinMaxParagraphWidth.cs // // Contents: MinMaxParagraphWidth represents two values - the smallest and largest possible // paragraph width that can fully contain specified text content. // // Spec: http://team/sites/Avalon/Specs/Text%20Formatting%20API.doc // // Created: 1-2-2004 Worachai Chaoweeraprasit (wchao) // //----------------------------------------------------------------------- using System; using System.Collections; using System.Windows; namespace System.Windows.Media.TextFormatting { ////// MinMaxParagraphWidth represents two values - the smallest and largest possible /// paragraph width that can fully contain specified text content /// public struct MinMaxParagraphWidth : IEquatable{ internal MinMaxParagraphWidth( double minWidth, double maxWidth ) { _minWidth = minWidth; _maxWidth = maxWidth; } /// /// smallest paragraph width possible /// public double MinWidth { get { return _minWidth; } } ////// largest paragraph width possible /// public double MaxWidth { get { return _maxWidth; } } ////// Compute hash code /// public override int GetHashCode() { return _minWidth.GetHashCode() ^ _maxWidth.GetHashCode(); } ////// Test equality with the input MinMaxParagraphWidth value /// /// The MinMaxParagraphWidth value to test public bool Equals(MinMaxParagraphWidth value) { return this == value; } ////// Test equality with the input MinMaxParagraphWidth value /// /// the object to test public override bool Equals(object obj) { if (!(obj is MinMaxParagraphWidth)) return false; return this == (MinMaxParagraphWidth)obj; } ////// Compare two MinMaxParagraphWidth for equality /// /// left operand /// right operand ///whether or not two operands are equal public static bool operator ==( MinMaxParagraphWidth left, MinMaxParagraphWidth right ) { return left._minWidth == right._minWidth && left._maxWidth == right._maxWidth; } ////// Compare two MinMaxParagraphWidth for inequality /// /// left operand /// right operand ///whether or not two operands are equal public static bool operator !=( MinMaxParagraphWidth left, MinMaxParagraphWidth right ) { return !(left == right); } private double _minWidth; private double _maxWidth; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DynamicPropertyHolder.cs
- FilterElement.cs
- ListBase.cs
- FileClassifier.cs
- NumericUpDownAcceleration.cs
- DefaultClaimSet.cs
- SwitchCase.cs
- GridViewRowPresenterBase.cs
- OracleInternalConnection.cs
- ZipIOExtraFieldPaddingElement.cs
- BinaryNode.cs
- TreeIterators.cs
- XmlSerializationGeneratedCode.cs
- EncryptedType.cs
- SamlConditions.cs
- _FtpControlStream.cs
- TdsParserHelperClasses.cs
- GlobalizationSection.cs
- PerfProviderCollection.cs
- PlatformNotSupportedException.cs
- CodeSnippetTypeMember.cs
- TextEffectCollection.cs
- ProviderCommandInfoUtils.cs
- PopupControlService.cs
- DefaultEventAttribute.cs
- IOThreadScheduler.cs
- MergablePropertyAttribute.cs
- ScrollItemProviderWrapper.cs
- ResourcePermissionBaseEntry.cs
- EndCreateSecurityTokenRequest.cs
- Classification.cs
- IndicShape.cs
- FixedSOMLineCollection.cs
- ReadOnlyHierarchicalDataSource.cs
- WebPageTraceListener.cs
- GroupItem.cs
- ProfileProvider.cs
- DesignTimeTemplateParser.cs
- WorkflowTimerService.cs
- EnlistmentState.cs
- TriggerActionCollection.cs
- IntermediatePolicyValidator.cs
- GraphicsPathIterator.cs
- ComponentManagerBroker.cs
- DocumentPaginator.cs
- HitTestParameters.cs
- FieldNameLookup.cs
- EventBuilder.cs
- ManipulationBoundaryFeedbackEventArgs.cs
- ListBoxChrome.cs
- MetadataCacheItem.cs
- CatalogPartDesigner.cs
- TableAdapterManagerGenerator.cs
- DesignerLinkAdapter.cs
- BitConverter.cs
- PartialCachingAttribute.cs
- HyperLinkColumn.cs
- ThaiBuddhistCalendar.cs
- SHA1.cs
- safex509handles.cs
- DetailsViewUpdatedEventArgs.cs
- XmlReflectionMember.cs
- DataPager.cs
- Int16Storage.cs
- SqlDataSource.cs
- CannotUnloadAppDomainException.cs
- EventMappingSettings.cs
- HttpHandlersSection.cs
- XmlLinkedNode.cs
- MediaElementAutomationPeer.cs
- ToolStripItem.cs
- ControlBindingsCollection.cs
- ChannelSettingsElement.cs
- SQLDecimal.cs
- FileFormatException.cs
- SHA1Managed.cs
- MailAddressCollection.cs
- WriteTimeStream.cs
- WorkItem.cs
- EventlogProvider.cs
- XhtmlTextWriter.cs
- XmlQualifiedName.cs
- ImagingCache.cs
- DatagridviewDisplayedBandsData.cs
- Rotation3DKeyFrameCollection.cs
- DateTimeOffset.cs
- Random.cs
- GlobalItem.cs
- CodeDirectionExpression.cs
- CustomAttributeFormatException.cs
- Site.cs
- CmsInterop.cs
- TreeChangeInfo.cs
- TableHeaderCell.cs
- EventLogTraceListener.cs
- HuffCodec.cs
- ProfileEventArgs.cs
- PassportAuthenticationEventArgs.cs
- ListViewInsertionMark.cs
- ProcessDesigner.cs