Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Documents / FixedLineResult.cs / 1305600 / FixedLineResult.cs
//---------------------------------------------------------------------------- //// Copyright (C) 2004 by Microsoft Corporation. All rights reserved. // // // Description: // FixedLineResult represents a per-line layout info for a fixe page // // History: // 11/23/2004 - Zhenbin Xu (ZhenbinX) - Created. // //--------------------------------------------------------------------------- namespace System.Windows.Documents { using MS.Internal.Documents; using System; using System.Collections; using System.Diagnostics; using System.Globalization; //===================================================================== ////// FixedLineResult represents a per-line layout info for a fixe page /// internal sealed class FixedLineResult : IComparable { //------------------------------------------------------------------- // // Connstructors // //---------------------------------------------------------------------- #region Constructors internal FixedLineResult(FixedNode[] nodes, Rect layoutBox) { _nodes = nodes; _layoutBox = layoutBox; } #endregion Constructors //------------------------------------------------------------------- // // Public Methods // //---------------------------------------------------------------------- // IComparable Override public int CompareTo(object o) { if (o == null) { throw new ArgumentNullException("o"); } if (o.GetType() != typeof(FixedLineResult)) { throw new ArgumentException(SR.Get(SRID.UnexpectedParameterType, o.GetType(), typeof(FixedLineResult)), "o"); } FixedLineResult lineResult = (FixedLineResult)o; return this.BaseLine.CompareTo(lineResult.BaseLine); } #if DEBUG ////// Create a string representation of this object /// ///string - A string representation of this object public override string ToString() { return String.Format(CultureInfo.InvariantCulture, "FLR[{0}:{1}][{2}][{3}]", Start.ToString(), End.ToString(), BaseLine, _layoutBox); } #endif //-------------------------------------------------------------------- // // Public Properties // //--------------------------------------------------------------------- //-------------------------------------------------------------------- // // Public Events // //--------------------------------------------------------------------- //------------------------------------------------------------------- // // Internal Methods // //--------------------------------------------------------------------- //-------------------------------------------------------------------- // // Internal Properties // //--------------------------------------------------------------------- #region Internal Properties // internal FixedNode Start { get { return _nodes[0]; } } internal FixedNode End { get { return _nodes[_nodes.Length - 1]; } } internal FixedNode[] Nodes { get { return _nodes; } } internal double BaseLine { get { return _layoutBox.Bottom; } } internal Rect LayoutBox { get { return _layoutBox; } } #endregion Internal Properties //-------------------------------------------------------------------- // // Private Methods // //---------------------------------------------------------------------- #region Private Properties #endregion Private Properties //------------------------------------------------------------------- // // Private Fields // //---------------------------------------------------------------------- #region Private Fields private readonly FixedNode[] _nodes; private readonly Rect _layoutBox; // relative to page #endregion Private Fields } } // 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
- CallbackHandler.cs
- EncryptRequest.cs
- SQLInt16.cs
- StateMachineDesignerPaint.cs
- ObjectStateEntry.cs
- TextViewDesigner.cs
- SearchForVirtualItemEventArgs.cs
- PairComparer.cs
- XsdDuration.cs
- DatePickerAutomationPeer.cs
- Page.cs
- XNodeValidator.cs
- PrinterUnitConvert.cs
- ElementFactory.cs
- CdpEqualityComparer.cs
- TextBoxRenderer.cs
- MessageSmuggler.cs
- RotateTransform.cs
- MasterPageCodeDomTreeGenerator.cs
- SemaphoreSecurity.cs
- FixedSOMTableCell.cs
- OpenFileDialog.cs
- ChangePassword.cs
- PersonalizationStateInfoCollection.cs
- ExceptionRoutedEventArgs.cs
- OleDbConnectionInternal.cs
- DefaultPropertiesToSend.cs
- SerializerProvider.cs
- ApplicationHost.cs
- Evidence.cs
- ImageListUtils.cs
- ThemeInfoAttribute.cs
- MDIControlStrip.cs
- ControlUtil.cs
- ParameterBuilder.cs
- EditBehavior.cs
- RepeatInfo.cs
- HtmlTableCell.cs
- MultiBindingExpression.cs
- SQLResource.cs
- CngAlgorithm.cs
- MailSettingsSection.cs
- Internal.cs
- Switch.cs
- FormsIdentity.cs
- ApplicationProxyInternal.cs
- FrameworkElement.cs
- PropertyFilter.cs
- ByteStreamBufferedMessageData.cs
- BaseDataList.cs
- ConfigViewGenerator.cs
- Environment.cs
- HttpCapabilitiesBase.cs
- SortQuery.cs
- metadatamappinghashervisitor.cs
- querybuilder.cs
- AnnotationComponentChooser.cs
- FilteredDataSetHelper.cs
- IIS7WorkerRequest.cs
- BreakSafeBase.cs
- AdRotator.cs
- WMIGenerator.cs
- RectConverter.cs
- TraceContextRecord.cs
- DoubleMinMaxAggregationOperator.cs
- NonBatchDirectoryCompiler.cs
- EditorZoneBase.cs
- DecoderFallbackWithFailureFlag.cs
- SourceFilter.cs
- SerializationObjectManager.cs
- XmlSchemaDatatype.cs
- Operator.cs
- LayoutEngine.cs
- PackageStore.cs
- SoapAttributeAttribute.cs
- CodeDomDesignerLoader.cs
- EncryptedReference.cs
- BuildResult.cs
- DrawingBrush.cs
- CodeDefaultValueExpression.cs
- InvalidCastException.cs
- DecimalMinMaxAggregationOperator.cs
- JoinGraph.cs
- WebPartDisplayModeCancelEventArgs.cs
- SelectionUIService.cs
- ByteAnimationBase.cs
- XmlCountingReader.cs
- DoubleAnimationClockResource.cs
- StructuralType.cs
- SqlReferenceCollection.cs
- RowToFieldTransformer.cs
- ProviderUtil.cs
- RewritingSimplifier.cs
- TargetConverter.cs
- EdmItemError.cs
- ConfigurationValidatorAttribute.cs
- XmlSchemaAnnotation.cs
- ConditionalBranch.cs
- ToolBarButton.cs
- DateTimeStorage.cs