Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Core / CSharp / System / Windows / Media / textformatting / MinMaxParagraphWidth.cs / 1 / 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. //------------------------------------------------------------------------ // // 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
- MenuItemStyle.cs
- HtmlEncodedRawTextWriter.cs
- DataGridBoolColumn.cs
- ProxyWebPart.cs
- KeyFrames.cs
- ResolveCriteriaCD1.cs
- MatrixCamera.cs
- PrivilegedConfigurationManager.cs
- ConnectionStringSettings.cs
- DataGridViewToolTip.cs
- HtmlTableCell.cs
- CodeDomSerializerBase.cs
- EditableLabelControl.cs
- nulltextcontainer.cs
- ConnectionInterfaceCollection.cs
- UserPreferenceChangedEventArgs.cs
- Propagator.JoinPropagator.cs
- Header.cs
- ScrollViewer.cs
- LinqDataSourceInsertEventArgs.cs
- TextViewSelectionProcessor.cs
- SqlCachedBuffer.cs
- Compiler.cs
- Reference.cs
- ResXResourceReader.cs
- VsPropertyGrid.cs
- PromptStyle.cs
- IResourceProvider.cs
- QilStrConcatenator.cs
- SqlServices.cs
- UnsafeNetInfoNativeMethods.cs
- BaseDataList.cs
- HtmlTextArea.cs
- WebServiceParameterData.cs
- MenuItemCollection.cs
- SqlMethodCallConverter.cs
- StatusStrip.cs
- RadioButtonPopupAdapter.cs
- MethodBuilder.cs
- SmtpFailedRecipientsException.cs
- RectangleConverter.cs
- XmlEnumAttribute.cs
- DetailsViewModeEventArgs.cs
- Soap11ServerProtocol.cs
- FixUpCollection.cs
- QueryCacheManager.cs
- BooleanProjectedSlot.cs
- SchemaCollectionPreprocessor.cs
- SaveFileDialog.cs
- AuthorizationRuleCollection.cs
- TerminateDesigner.cs
- MSAANativeProvider.cs
- Focus.cs
- Filter.cs
- IdentityHolder.cs
- ZipPackagePart.cs
- AssociatedControlConverter.cs
- StylusPlugInCollection.cs
- PropertyChangingEventArgs.cs
- DefaultSerializationProviderAttribute.cs
- SqlXml.cs
- UdpSocketReceiveManager.cs
- OleStrCAMarshaler.cs
- ProtectedConfigurationSection.cs
- ImageDrawing.cs
- RectAnimationClockResource.cs
- _NetworkingPerfCounters.cs
- CurrentTimeZone.cs
- TableCellCollection.cs
- TrackingProfileCache.cs
- DrawItemEvent.cs
- SelectedDatesCollection.cs
- UriTemplatePathPartiallyEquivalentSet.cs
- SqlGenericUtil.cs
- HttpConfigurationContext.cs
- HtmlHistory.cs
- ServicePoint.cs
- BuildManagerHost.cs
- CreateParams.cs
- FieldMetadata.cs
- DbgUtil.cs
- XmlWriterTraceListener.cs
- PropertyReferenceSerializer.cs
- SpellCheck.cs
- ResolveDuplexCD1AsyncResult.cs
- TaiwanCalendar.cs
- FontUnit.cs
- EDesignUtil.cs
- ConfigXmlAttribute.cs
- DataTemplateKey.cs
- Size.cs
- InputReport.cs
- XslTransform.cs
- StaticFileHandler.cs
- SharedStream.cs
- Matrix3D.cs
- ListItemCollection.cs
- BuildResultCache.cs
- ReaderWriterLock.cs
- ElementUtil.cs