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
- ConfigXmlCDataSection.cs
- AnimatedTypeHelpers.cs
- ExpressionBinding.cs
- CompiledQueryCacheEntry.cs
- ToolStripItemTextRenderEventArgs.cs
- ExpressionLink.cs
- DataDocumentXPathNavigator.cs
- TableLayoutColumnStyleCollection.cs
- NonVisualControlAttribute.cs
- PropertyMetadata.cs
- SignatureDescription.cs
- FontUnit.cs
- DynamicUpdateCommand.cs
- TypeBrowserDialog.cs
- dataobject.cs
- ISAPIApplicationHost.cs
- BindMarkupExtensionSerializer.cs
- Style.cs
- EllipseGeometry.cs
- COM2ColorConverter.cs
- NCryptNative.cs
- AsyncStreamReader.cs
- ThreadWorkerController.cs
- EncodingInfo.cs
- ConsumerConnectionPointCollection.cs
- PrincipalPermission.cs
- DecimalFormatter.cs
- IDQuery.cs
- ComboBoxItem.cs
- EntityException.cs
- AssociationTypeEmitter.cs
- DetailsViewInsertEventArgs.cs
- SystemColorTracker.cs
- ResourceDescriptionAttribute.cs
- PolicyManager.cs
- SessionStateSection.cs
- TextEffect.cs
- ExpressionBindingCollection.cs
- AnnouncementService.cs
- LinqDataSourceContextEventArgs.cs
- Parameter.cs
- Guid.cs
- XmlSchemaGroup.cs
- MediaSystem.cs
- mactripleDES.cs
- ReflectionServiceProvider.cs
- AuthenticationSection.cs
- DecimalKeyFrameCollection.cs
- PropertyConverter.cs
- ReadOnlyDictionary.cs
- clipboard.cs
- EntityContainerAssociationSet.cs
- AnnotationObservableCollection.cs
- FormatConvertedBitmap.cs
- dataobject.cs
- SystemMulticastIPAddressInformation.cs
- ProfileService.cs
- XamlPointCollectionSerializer.cs
- FtpRequestCacheValidator.cs
- HierarchicalDataBoundControlAdapter.cs
- PresentationTraceSources.cs
- DescendantBaseQuery.cs
- ReflectionTypeLoadException.cs
- ChildTable.cs
- XmlSchemaParticle.cs
- CodeLabeledStatement.cs
- FixedLineResult.cs
- PageSetupDialog.cs
- AlignmentYValidation.cs
- ShaderRenderModeValidation.cs
- UserControlBuildProvider.cs
- DoubleAverageAggregationOperator.cs
- BinaryObjectInfo.cs
- DataGridViewImageColumn.cs
- ResourceDescriptionAttribute.cs
- DateTimeOffsetConverter.cs
- ObjectViewListener.cs
- XmlTextEncoder.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- ButtonChrome.cs
- ProcessHostFactoryHelper.cs
- DurableInstance.cs
- precedingquery.cs
- GlobalizationSection.cs
- TextDecoration.cs
- InfoCardAsymmetricCrypto.cs
- CellCreator.cs
- CodeCatchClause.cs
- TextBox.cs
- HostingEnvironmentSection.cs
- SelfIssuedAuthRSAPKCS1SignatureDeformatter.cs
- FunctionQuery.cs
- TranslateTransform3D.cs
- ServiceProviders.cs
- TextEditorSpelling.cs
- XslAst.cs
- ScriptServiceAttribute.cs
- IIS7UserPrincipal.cs
- WebBrowserPermission.cs
- ColorAnimationUsingKeyFrames.cs