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
- DataRowView.cs
- HostingEnvironment.cs
- XsltContext.cs
- ObjectKeyFrameCollection.cs
- ToolStripSeparatorRenderEventArgs.cs
- MetadataStore.cs
- MsmqDiagnostics.cs
- SessionStateUtil.cs
- InlineCollection.cs
- GAC.cs
- MembershipValidatePasswordEventArgs.cs
- PagerSettings.cs
- HMACSHA1.cs
- HttpCacheVary.cs
- StateManagedCollection.cs
- XmlLanguage.cs
- StylusTip.cs
- CreateUserWizard.cs
- StorageInfo.cs
- StorageTypeMapping.cs
- MatrixTransform.cs
- ComponentChangedEvent.cs
- BreakSafeBase.cs
- ArraySortHelper.cs
- DataTable.cs
- ComAdminInterfaces.cs
- MethodRental.cs
- DataSourceXmlClassAttribute.cs
- WebBrowsableAttribute.cs
- ToolStripArrowRenderEventArgs.cs
- PackageFilter.cs
- EDesignUtil.cs
- DesignerTransactionCloseEvent.cs
- RSAPKCS1KeyExchangeFormatter.cs
- NoneExcludedImageIndexConverter.cs
- WebExceptionStatus.cs
- TriggerActionCollection.cs
- NativeMethods.cs
- DivideByZeroException.cs
- KerberosSecurityTokenProvider.cs
- CodePageUtils.cs
- AsyncCompletedEventArgs.cs
- ClaimTypes.cs
- WebProxyScriptElement.cs
- MDIWindowDialog.cs
- RegisteredHiddenField.cs
- CultureTable.cs
- ProxyWebPart.cs
- OutputWindow.cs
- wmiprovider.cs
- SaveFileDialog.cs
- DataObjectSettingDataEventArgs.cs
- _HTTPDateParse.cs
- ContextMenuAutomationPeer.cs
- XamlReader.cs
- Wildcard.cs
- MethodBuilder.cs
- RepeaterCommandEventArgs.cs
- IndentTextWriter.cs
- TableColumnCollection.cs
- LocalValueEnumerator.cs
- WorkflowMarkupElementEventArgs.cs
- CompilationRelaxations.cs
- RefreshPropertiesAttribute.cs
- WsatTransactionHeader.cs
- PropertyFilterAttribute.cs
- ConfigXmlAttribute.cs
- SplineKeyFrames.cs
- FontDifferentiator.cs
- DataSourceControl.cs
- WebBrowserBase.cs
- ToolStripScrollButton.cs
- CodePageEncoding.cs
- GlobalProxySelection.cs
- SqlDataReader.cs
- OracleParameterCollection.cs
- TextParagraphProperties.cs
- ScopelessEnumAttribute.cs
- AutoSizeComboBox.cs
- DataPager.cs
- FtpWebRequest.cs
- BinaryObjectWriter.cs
- HitTestParameters3D.cs
- ColumnWidthChangingEvent.cs
- TimeoutValidationAttribute.cs
- RequiredFieldValidator.cs
- XmlUnspecifiedAttribute.cs
- FilterQuery.cs
- wgx_sdk_version.cs
- WindowsFormsSynchronizationContext.cs
- DeadCharTextComposition.cs
- Camera.cs
- EntityContainerRelationshipSetEnd.cs
- SystemColors.cs
- Site.cs
- InstanceDataCollection.cs
- DataSet.cs
- NamespaceImport.cs
- MergeExecutor.cs
- ObjectView.cs