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
- iisPickupDirectory.cs
- NameScope.cs
- ControlPropertyNameConverter.cs
- DefaultTextStore.cs
- DbConnectionClosed.cs
- ConfigurationErrorsException.cs
- DataPagerCommandEventArgs.cs
- Int16Converter.cs
- OleDbFactory.cs
- x509store.cs
- FocusTracker.cs
- ZoomingMessageFilter.cs
- RevocationPoint.cs
- FileAuthorizationModule.cs
- WebPartCatalogAddVerb.cs
- Msec.cs
- FileDetails.cs
- FormsAuthenticationCredentials.cs
- Char.cs
- TextBoxDesigner.cs
- HtmlShim.cs
- HierarchicalDataSourceControl.cs
- RoleGroupCollection.cs
- UserControlCodeDomTreeGenerator.cs
- IISMapPath.cs
- Membership.cs
- XmlSchemaChoice.cs
- CircleHotSpot.cs
- ColumnClickEvent.cs
- rsa.cs
- SchemaDeclBase.cs
- ValueType.cs
- QueryContinueDragEventArgs.cs
- ParagraphVisual.cs
- PerformanceCountersElement.cs
- PackagingUtilities.cs
- COM2FontConverter.cs
- GraphicsPath.cs
- ConnectionStringSettings.cs
- WpfPayload.cs
- BinaryCommonClasses.cs
- AttachedPropertyBrowsableAttribute.cs
- GlyphCache.cs
- XPathDocumentNavigator.cs
- FacetValueContainer.cs
- PropertyManager.cs
- WindowHelperService.cs
- AutomationPattern.cs
- WebPartMenu.cs
- Nullable.cs
- XPathDocumentBuilder.cs
- MediaSystem.cs
- WindowsMenu.cs
- Attributes.cs
- ModuleBuilderData.cs
- ImageIndexConverter.cs
- SubMenuStyle.cs
- EventLogger.cs
- validation.cs
- ForEachDesigner.xaml.cs
- DataControlExtensions.cs
- Lasso.cs
- BindingObserver.cs
- Hashtable.cs
- _ConnectOverlappedAsyncResult.cs
- XmlElement.cs
- WebServiceMethodData.cs
- TypeBrowser.xaml.cs
- ThemeableAttribute.cs
- RadioButton.cs
- WindowsListViewItemCheckBox.cs
- PtsPage.cs
- Pkcs7Signer.cs
- RangeValueProviderWrapper.cs
- SHA256Managed.cs
- AttributeQuery.cs
- DetailsView.cs
- InputEventArgs.cs
- TextSegment.cs
- DecimalConstantAttribute.cs
- SerializationHelper.cs
- Boolean.cs
- KeyGestureConverter.cs
- WindowsTreeView.cs
- NameTable.cs
- Stylus.cs
- Currency.cs
- MetadataUtil.cs
- DecoderBestFitFallback.cs
- UseAttributeSetsAction.cs
- HandledEventArgs.cs
- DecoratedNameAttribute.cs
- ErrorsHelper.cs
- LogLogRecordEnumerator.cs
- VisualBrush.cs
- Setter.cs
- StoreAnnotationsMap.cs
- Interlocked.cs
- RangeExpression.cs
- SiteMapDataSourceView.cs