Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- ReadOnlyAttribute.cs
- SystemKeyConverter.cs
- HitTestWithGeometryDrawingContextWalker.cs
- XmlDocumentType.cs
- Validator.cs
- HMACSHA512.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- ButtonDesigner.cs
- MultiSelectRootGridEntry.cs
- DbgUtil.cs
- ConfigurationSectionGroup.cs
- ChtmlMobileTextWriter.cs
- HtmlTitle.cs
- BulletedList.cs
- RegexRunnerFactory.cs
- SignatureHelper.cs
- UpdateCommand.cs
- VisualProxy.cs
- DictionaryEditChange.cs
- TextSyndicationContentKindHelper.cs
- Graphics.cs
- BamlTreeUpdater.cs
- ChannelDispatcherCollection.cs
- SystemInfo.cs
- BaseParser.cs
- ServiceDesigner.cs
- ContractMapping.cs
- GeometryConverter.cs
- CanonicalizationDriver.cs
- DataGridRelationshipRow.cs
- AdapterUtil.cs
- SmtpReplyReader.cs
- ComponentCommands.cs
- ResourcePart.cs
- UIHelper.cs
- WinInetCache.cs
- BitmapCacheBrush.cs
- ObjectKeyFrameCollection.cs
- LassoHelper.cs
- IdentityValidationException.cs
- StateMachineWorkflowInstance.cs
- GeneralTransform2DTo3DTo2D.cs
- RegionInfo.cs
- SimpleWorkerRequest.cs
- AnnotationHighlightLayer.cs
- DBCommand.cs
- AliasGenerator.cs
- SimpleHandlerBuildProvider.cs
- SoapObjectWriter.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- TreeView.cs
- XamlReaderHelper.cs
- Process.cs
- SplitterPanel.cs
- PerspectiveCamera.cs
- CodeAccessSecurityEngine.cs
- CharacterMetrics.cs
- SqlSupersetValidator.cs
- Timer.cs
- SQLStringStorage.cs
- XamlToRtfParser.cs
- PrintingPermissionAttribute.cs
- NameHandler.cs
- ColumnMapVisitor.cs
- DrawingAttributeSerializer.cs
- webeventbuffer.cs
- VisualBasicReference.cs
- ScriptMethodAttribute.cs
- DataListItem.cs
- WmiEventSink.cs
- NullToBooleanConverter.cs
- AspCompat.cs
- HierarchicalDataBoundControl.cs
- ProcessModelSection.cs
- ProvidePropertyAttribute.cs
- NameValueSectionHandler.cs
- X509ChainElement.cs
- CompletionBookmark.cs
- Vector3DValueSerializer.cs
- TextCompositionManager.cs
- SiteMapDataSourceDesigner.cs
- IndependentAnimationStorage.cs
- RegexTypeEditor.cs
- PathSegment.cs
- SafeRightsManagementPubHandle.cs
- TemplateColumn.cs
- ScaleTransform3D.cs
- Bezier.cs
- CoTaskMemHandle.cs
- TargetControlTypeCache.cs
- ClientSettings.cs
- Vector3DAnimation.cs
- LookupNode.cs
- KeyboardDevice.cs
- TimersDescriptionAttribute.cs
- NamedObject.cs
- ArrayTypeMismatchException.cs
- ResXFileRef.cs
- ObjectListComponentEditor.cs
- TextRangeEditTables.cs