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
- BooleanConverter.cs
- BasePropertyDescriptor.cs
- PixelFormats.cs
- PageAdapter.cs
- PenLineCapValidation.cs
- XmlAttributeAttribute.cs
- StorageBasedPackageProperties.cs
- DesignerLoader.cs
- CodeDirectiveCollection.cs
- DesignTimeType.cs
- MissingManifestResourceException.cs
- SqlDataSourceCache.cs
- SqlDataSourceWizardForm.cs
- MetadataPropertyAttribute.cs
- ClientReliableChannelBinder.cs
- PeerInputChannelListener.cs
- HandlerMappingMemo.cs
- ScriptDescriptor.cs
- ParsedAttributeCollection.cs
- CryptoKeySecurity.cs
- ToolStripButton.cs
- PersonalizationStateInfoCollection.cs
- FixedBufferAttribute.cs
- HttpProfileGroupBase.cs
- sqlnorm.cs
- CacheDependency.cs
- SqlConnectionManager.cs
- XmlSchemaSearchPattern.cs
- PersonalizationStateQuery.cs
- WindowAutomationPeer.cs
- returneventsaver.cs
- Operator.cs
- FixedSOMLineCollection.cs
- Vector3DAnimationBase.cs
- CodeSnippetTypeMember.cs
- LinkGrep.cs
- BuiltInPermissionSets.cs
- BuildProviderUtils.cs
- ImmutableObjectAttribute.cs
- CaseInsensitiveComparer.cs
- OrderByQueryOptionExpression.cs
- DeploymentExceptionMapper.cs
- EntityCommand.cs
- Sentence.cs
- InstanceValue.cs
- HttpClientCertificate.cs
- StringInfo.cs
- ShadowGlyph.cs
- DispatcherTimer.cs
- EmbeddedMailObject.cs
- CacheDependency.cs
- ComboBox.cs
- Timeline.cs
- StringUtil.cs
- NamespaceListProperty.cs
- TypeDescriptor.cs
- SqlRewriteScalarSubqueries.cs
- ListBoxItem.cs
- DataControlField.cs
- CodeObjectCreateExpression.cs
- WebPartZoneBase.cs
- DocumentCollection.cs
- TextDataBindingHandler.cs
- DynamicEndpoint.cs
- SupportsEventValidationAttribute.cs
- DataGrid.cs
- StylusTip.cs
- AssemblySettingAttributes.cs
- SafeWaitHandle.cs
- OracleCommand.cs
- KeyValueConfigurationCollection.cs
- SqlDuplicator.cs
- EditingCommands.cs
- BufferedWebEventProvider.cs
- IconBitmapDecoder.cs
- KeyboardNavigation.cs
- DropDownButton.cs
- TypeGeneratedEventArgs.cs
- RegisteredDisposeScript.cs
- Canvas.cs
- AdjustableArrowCap.cs
- EntityDataSourceEntityTypeFilterItem.cs
- UIElement.cs
- StringTraceRecord.cs
- Transform.cs
- Debugger.cs
- Renderer.cs
- ADMembershipProvider.cs
- SoapSchemaImporter.cs
- linebase.cs
- IOThreadScheduler.cs
- HijriCalendar.cs
- safex509handles.cs
- EntityViewContainer.cs
- StateDesigner.Layouts.cs
- NavigationHelper.cs
- Pkcs9Attribute.cs
- TypeDependencyAttribute.cs
- DataContract.cs
- WindowsGraphics2.cs