Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / textformatting / TextEndOfLine.cs / 1305600 / TextEndOfLine.cs
//------------------------------------------------------------------------ // // Microsoft Windows Client Platform // Copyright (C) Microsoft Corporation // // File: TextEndOfLine.cs // // Contents: Implementation of text linebreak control // // 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; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.TextFormatting { ////// Specialized text run used to mark the end of a line /// public class TextEndOfLine : TextRun { private int _length; private TextRunProperties _textRunProperties; #region Constructors ////// Construct a linebreak run /// /// number of characters public TextEndOfLine(int length) : this(length, null) {} ////// Construct a linebreak run /// /// number of characters /// linebreak text run properties public TextEndOfLine( int length, TextRunProperties textRunProperties ) { if (length <= 0) throw new ArgumentOutOfRangeException("length", SR.Get(SRID.ParameterMustBeGreaterThanZero)); if (textRunProperties != null && textRunProperties.Typeface == null) throw new ArgumentNullException("textRunProperties.Typeface"); _length = length; _textRunProperties = textRunProperties; } #endregion ////// Reference to character buffer /// public sealed override CharacterBufferReference CharacterBufferReference { get { return new CharacterBufferReference(); } } ////// Character length /// public sealed override int Length { get { return _length; } } ////// A set of properties shared by every characters in the run /// public sealed override TextRunProperties Properties { get { return _textRunProperties; } } } } // 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 // // File: TextEndOfLine.cs // // Contents: Implementation of text linebreak control // // 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; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.TextFormatting { ////// Specialized text run used to mark the end of a line /// public class TextEndOfLine : TextRun { private int _length; private TextRunProperties _textRunProperties; #region Constructors ////// Construct a linebreak run /// /// number of characters public TextEndOfLine(int length) : this(length, null) {} ////// Construct a linebreak run /// /// number of characters /// linebreak text run properties public TextEndOfLine( int length, TextRunProperties textRunProperties ) { if (length <= 0) throw new ArgumentOutOfRangeException("length", SR.Get(SRID.ParameterMustBeGreaterThanZero)); if (textRunProperties != null && textRunProperties.Typeface == null) throw new ArgumentNullException("textRunProperties.Typeface"); _length = length; _textRunProperties = textRunProperties; } #endregion ////// Reference to character buffer /// public sealed override CharacterBufferReference CharacterBufferReference { get { return new CharacterBufferReference(); } } ////// Character length /// public sealed override int Length { get { return _length; } } ////// A set of properties shared by every characters in the run /// public sealed override TextRunProperties Properties { get { return _textRunProperties; } } } } // 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
- FormsIdentity.cs
- TypeConverterMarkupExtension.cs
- HostProtectionException.cs
- DecoderBestFitFallback.cs
- InternalCache.cs
- StructuredType.cs
- ServiceObjectContainer.cs
- SqlServices.cs
- TypeInitializationException.cs
- SelectionGlyphBase.cs
- WebRequestModuleElementCollection.cs
- ActivationArguments.cs
- TreeNodeEventArgs.cs
- TextDecorationCollection.cs
- ForwardPositionQuery.cs
- SchemaRegistration.cs
- Zone.cs
- HttpApplication.cs
- FormsAuthentication.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- TypedTableBase.cs
- FormsAuthenticationConfiguration.cs
- TextRangeAdaptor.cs
- WebPartDescriptionCollection.cs
- SqlClientFactory.cs
- TextLine.cs
- FacetDescription.cs
- ExpressionBuilder.cs
- KeyedQueue.cs
- CompositionAdorner.cs
- Section.cs
- OdbcConnectionFactory.cs
- CacheChildrenQuery.cs
- RouteUrlExpressionBuilder.cs
- storepermissionattribute.cs
- SplitterEvent.cs
- IWorkflowDebuggerService.cs
- GraphicsContainer.cs
- Assert.cs
- RequestCachingSection.cs
- EdmItemCollection.cs
- QueryServiceConfigHandle.cs
- XmlUtilWriter.cs
- StringDictionary.cs
- EmptyEnumerable.cs
- XsltInput.cs
- SymbolType.cs
- ModelTreeEnumerator.cs
- XmlCharCheckingWriter.cs
- TextServicesLoader.cs
- Adorner.cs
- CriticalHandle.cs
- COM2TypeInfoProcessor.cs
- XmlImplementation.cs
- RotateTransform3D.cs
- InstanceDataCollection.cs
- OpCellTreeNode.cs
- FormViewPagerRow.cs
- Wildcard.cs
- ToolStripItemEventArgs.cs
- MediaPlayer.cs
- AxDesigner.cs
- cache.cs
- VisualBrush.cs
- Panel.cs
- TypeSource.cs
- XmlSchemaChoice.cs
- TextEditorThreadLocalStore.cs
- ExclusiveTcpListener.cs
- TokenizerHelper.cs
- LambdaExpression.cs
- MessageFormatterConverter.cs
- CategoryValueConverter.cs
- ObjectDataSourceEventArgs.cs
- HatchBrush.cs
- EncryptedData.cs
- MatrixCamera.cs
- MatrixConverter.cs
- SQLInt16.cs
- ToolTipService.cs
- SplitContainer.cs
- KeyFrames.cs
- XmlWriterSettings.cs
- SizeF.cs
- CompositionAdorner.cs
- ReadOnlyHierarchicalDataSource.cs
- Stack.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- Vector3DCollectionConverter.cs
- User.cs
- __ComObject.cs
- DesignerHelpers.cs
- PathTooLongException.cs
- GlyphRun.cs
- _FtpDataStream.cs
- Visitor.cs
- RegexFCD.cs
- TypeFieldSchema.cs
- ContextInformation.cs
- UInt64.cs