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
- ZipIOExtraFieldPaddingElement.cs
- EnterpriseServicesHelper.cs
- TerminatorSinks.cs
- ActivitiesCollection.cs
- HighContrastHelper.cs
- PseudoWebRequest.cs
- Padding.cs
- InitializationEventAttribute.cs
- StateManagedCollection.cs
- DataPagerCommandEventArgs.cs
- ColorAnimationBase.cs
- LowerCaseStringConverter.cs
- CounterSet.cs
- PageStatePersister.cs
- Version.cs
- ComEventsInfo.cs
- DrawingGroup.cs
- StrokeSerializer.cs
- PackWebResponse.cs
- GotoExpression.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- SqlDataSourceQueryEditor.cs
- RouteValueExpressionBuilder.cs
- UiaCoreProviderApi.cs
- QueryExpr.cs
- Parsers.cs
- EventLogTraceListener.cs
- TogglePattern.cs
- PrintDialog.cs
- TabletDevice.cs
- CompositeDesignerAccessibleObject.cs
- SplashScreen.cs
- SmtpAuthenticationManager.cs
- ExeContext.cs
- TextSelectionHighlightLayer.cs
- DataGridViewIntLinkedList.cs
- ReturnEventArgs.cs
- ListControl.cs
- PagesSection.cs
- IisTraceListener.cs
- MessageParameterAttribute.cs
- MdiWindowListItemConverter.cs
- RelatedPropertyManager.cs
- XmlWhitespace.cs
- DomNameTable.cs
- TreeIterator.cs
- DataGridViewCellValidatingEventArgs.cs
- BypassElement.cs
- SqlNotificationRequest.cs
- InputLanguage.cs
- DesignerActionVerbItem.cs
- CodeMemberProperty.cs
- WebPartsPersonalization.cs
- MessageQueueInstaller.cs
- ToolStripPanelCell.cs
- HostedTransportConfigurationBase.cs
- ClipboardProcessor.cs
- WMIInterop.cs
- SqlDataSourceEnumerator.cs
- ThumbButtonInfo.cs
- DictionaryContent.cs
- FileNameEditor.cs
- DefaultShape.cs
- CounterCreationData.cs
- Transform3D.cs
- SelfIssuedSamlTokenFactory.cs
- AmbiguousMatchException.cs
- PtsHelper.cs
- SqlInfoMessageEvent.cs
- InputMethodStateTypeInfo.cs
- ObjectToIdCache.cs
- SafeSystemMetrics.cs
- XmlKeywords.cs
- VisualBrush.cs
- SafeFileHandle.cs
- CompositeScriptReferenceEventArgs.cs
- StyleSheetDesigner.cs
- DataGridViewRowPostPaintEventArgs.cs
- DragEvent.cs
- WindowsListViewGroupHelper.cs
- StructuredCompositeActivityDesigner.cs
- StoryFragments.cs
- CacheVirtualItemsEvent.cs
- DetailsViewUpdateEventArgs.cs
- ApplicationDirectory.cs
- RightsManagementPermission.cs
- NavigationCommands.cs
- OpacityConverter.cs
- TaskFormBase.cs
- StorageComplexTypeMapping.cs
- GeometryCombineModeValidation.cs
- ResponseBodyWriter.cs
- PageFunction.cs
- QuestionEventArgs.cs
- EntityDataSourceChangingEventArgs.cs
- XmlAnyElementAttributes.cs
- RenderData.cs
- FunctionDescription.cs
- ObjectPersistData.cs
- DataGridViewButtonCell.cs