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
- ReaderWriterLockSlim.cs
- LoginViewDesigner.cs
- FtpWebRequest.cs
- Brushes.cs
- ButtonColumn.cs
- DynamicDataManager.cs
- Wizard.cs
- StateDesigner.cs
- WmlListAdapter.cs
- entityreference_tresulttype.cs
- _NetRes.cs
- OracleDataReader.cs
- TextEditorTyping.cs
- XmlTypeMapping.cs
- NavigationEventArgs.cs
- CompilerGlobalScopeAttribute.cs
- Matrix.cs
- MethodCallTranslator.cs
- DesignerForm.cs
- TextServicesCompartmentContext.cs
- WebProxyScriptElement.cs
- DoubleIndependentAnimationStorage.cs
- log.cs
- ServiceContractViewControl.Designer.cs
- DecoderFallback.cs
- Double.cs
- ThreadStaticAttribute.cs
- ScrollItemProviderWrapper.cs
- smtpconnection.cs
- LinkClickEvent.cs
- Context.cs
- NumberFormatInfo.cs
- WindowsServiceCredential.cs
- DataGridViewRowConverter.cs
- baseaxisquery.cs
- CellConstant.cs
- InvalidCastException.cs
- KnownTypeDataContractResolver.cs
- MasterPageParser.cs
- ItemCollection.cs
- RegexMatchCollection.cs
- XmlResolver.cs
- RSAProtectedConfigurationProvider.cs
- RtfControlWordInfo.cs
- CodeAttributeArgument.cs
- HostProtectionException.cs
- DefaultPropertiesToSend.cs
- DeadCharTextComposition.cs
- CryptoStream.cs
- PageEventArgs.cs
- ProfilePropertyMetadata.cs
- TextUtf8RawTextWriter.cs
- ChildrenQuery.cs
- WebPartHeaderCloseVerb.cs
- SuppressMessageAttribute.cs
- Point3DCollection.cs
- Attributes.cs
- FamilyMapCollection.cs
- SafeRightsManagementSessionHandle.cs
- SpellerError.cs
- SqlServices.cs
- ArglessEventHandlerProxy.cs
- ResourceExpression.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- BitmapDecoder.cs
- QuaternionValueSerializer.cs
- TextPatternIdentifiers.cs
- Rectangle.cs
- ListViewItem.cs
- DataControlField.cs
- ResolveMatchesApril2005.cs
- DistributedTransactionPermission.cs
- ListViewEditEventArgs.cs
- TableCellAutomationPeer.cs
- MemberInfoSerializationHolder.cs
- ResourceManager.cs
- NavigationWindow.cs
- CSharpCodeProvider.cs
- KeyValueConfigurationElement.cs
- WebInvokeAttribute.cs
- WebBrowserUriTypeConverter.cs
- XpsPartBase.cs
- CodeStatementCollection.cs
- ConsumerConnectionPointCollection.cs
- DesignerCatalogPartChrome.cs
- ComboBox.cs
- DropTarget.cs
- PersistenceProviderFactory.cs
- Pen.cs
- storepermission.cs
- RowBinding.cs
- MemoryFailPoint.cs
- PackageRelationshipCollection.cs
- NativeWindow.cs
- ObjectAnimationBase.cs
- ReturnValue.cs
- Ticks.cs
- CodePrimitiveExpression.cs
- SequenceRange.cs
- XPathNodePointer.cs