Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / 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: [....]/sites/Avalon/Specs/Text%20Formatting%20API.doc // // Created: 1-2-2004 [....] ([....]) // //----------------------------------------------------------------------- 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
- TraceUtils.cs
- RelOps.cs
- OleDbStruct.cs
- DesignerDataRelationship.cs
- MemberExpression.cs
- HierarchicalDataSourceControl.cs
- SessionEndedEventArgs.cs
- ReachFixedDocumentSerializer.cs
- SevenBitStream.cs
- ChildTable.cs
- CodeIdentifier.cs
- RegionData.cs
- FunctionDefinition.cs
- Mappings.cs
- MenuItemCollectionEditorDialog.cs
- CodeArrayCreateExpression.cs
- CodeTypeConstructor.cs
- NetworkInformationPermission.cs
- TypeGeneratedEventArgs.cs
- PropertyGeneratedEventArgs.cs
- CommandBindingCollection.cs
- ExtensionQuery.cs
- RuntimeEnvironment.cs
- PageAdapter.cs
- FrameworkElementFactoryMarkupObject.cs
- StrokeIntersection.cs
- Ops.cs
- EncodingNLS.cs
- BrushMappingModeValidation.cs
- TableRowCollection.cs
- TextTreeInsertElementUndoUnit.cs
- WebRequest.cs
- DataQuery.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- Switch.cs
- RepeaterItemCollection.cs
- GlobalAllocSafeHandle.cs
- DataGridViewCellValidatingEventArgs.cs
- XPathDocument.cs
- XmlSchemaValidator.cs
- PeerNameResolver.cs
- ViewManager.cs
- OleAutBinder.cs
- embossbitmapeffect.cs
- CommandBindingCollection.cs
- DefaultValueAttribute.cs
- SynchronizedChannelCollection.cs
- SqlTriggerContext.cs
- MimeMultiPart.cs
- MsmqMessageSerializationFormat.cs
- XPathParser.cs
- RepeaterItemCollection.cs
- EventLog.cs
- XamlTypeMapper.cs
- EdgeModeValidation.cs
- Assembly.cs
- FixedElement.cs
- Baml6Assembly.cs
- MemberAssignmentAnalysis.cs
- EventLogEntry.cs
- DictionaryEntry.cs
- DateTimeUtil.cs
- DynamicVirtualDiscoSearcher.cs
- OnOperation.cs
- PermissionAttributes.cs
- ToolStripSplitStackLayout.cs
- IndexedGlyphRun.cs
- SettingsAttributeDictionary.cs
- StylusTip.cs
- OutputCacheModule.cs
- NotifyInputEventArgs.cs
- Button.cs
- AuthorizationRule.cs
- DataControlLinkButton.cs
- SafeIUnknown.cs
- _TimerThread.cs
- glyphs.cs
- EditorResources.cs
- sqlstateclientmanager.cs
- MetadataPropertyvalue.cs
- PcmConverter.cs
- MethodToken.cs
- BooleanExpr.cs
- SineEase.cs
- ResourceAttributes.cs
- State.cs
- TextModifierScope.cs
- ForEachAction.cs
- GroupLabel.cs
- ErrorHandlerModule.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- ParameterModifier.cs
- ErrorHandlingReceiver.cs
- DataTableCollection.cs
- TriggerAction.cs
- SafeArrayRankMismatchException.cs
- SpinWait.cs
- X509Utils.cs
- ScrollPattern.cs
- WebPartAuthorizationEventArgs.cs