Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / Media / textformatting / TextEndOfLine.cs / 1 / 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
- TemplateKeyConverter.cs
- ReadOnlyDictionary.cs
- DbConvert.cs
- QilName.cs
- LocalizableAttribute.cs
- ProvidePropertyAttribute.cs
- BuildProviderAppliesToAttribute.cs
- SymLanguageType.cs
- Expressions.cs
- SpeechSynthesizer.cs
- WsdlBuildProvider.cs
- Size3DConverter.cs
- KnownTypeHelper.cs
- DefaultAsyncDataDispatcher.cs
- GcHandle.cs
- CapabilitiesAssignment.cs
- AdapterUtil.cs
- XsltSettings.cs
- ImageIndexConverter.cs
- PointKeyFrameCollection.cs
- VirtualPath.cs
- DependencyObject.cs
- controlskin.cs
- TextModifier.cs
- SqlStream.cs
- SQLInt16Storage.cs
- TableLayoutPanel.cs
- OptimizerPatterns.cs
- _RequestCacheProtocol.cs
- OutArgumentConverter.cs
- QilStrConcatenator.cs
- QilName.cs
- XmlCharType.cs
- NavigationFailedEventArgs.cs
- AppendHelper.cs
- XmlAtomicValue.cs
- AttributeProviderAttribute.cs
- BaseAsyncResult.cs
- Graphics.cs
- LineInfo.cs
- ViewGenerator.cs
- MaterialGroup.cs
- SafeSecurityHandles.cs
- BinaryObjectReader.cs
- Keywords.cs
- AlphaSortedEnumConverter.cs
- SqlWorkflowPersistenceService.cs
- Array.cs
- MouseCaptureWithinProperty.cs
- Matrix.cs
- XmlDocumentFragment.cs
- ServicesUtilities.cs
- ModifyActivitiesPropertyDescriptor.cs
- DependsOnAttribute.cs
- BaseDataListActionList.cs
- HtmlToClrEventProxy.cs
- IsolatedStorageFilePermission.cs
- EventHandlersStore.cs
- MediaPlayerState.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- XmlSignificantWhitespace.cs
- RightsManagementEncryptedStream.cs
- EventLogPermission.cs
- MenuItemCollection.cs
- PrivacyNoticeElement.cs
- shaper.cs
- DoubleLink.cs
- AdapterDictionary.cs
- WCFModelStrings.Designer.cs
- WebBaseEventKeyComparer.cs
- SingleResultAttribute.cs
- MatrixUtil.cs
- XpsResourcePolicy.cs
- SqlDuplicator.cs
- CompilerScope.cs
- DBParameter.cs
- MissingMemberException.cs
- MexServiceChannelBuilder.cs
- PersonalizationEntry.cs
- HtmlButton.cs
- BindingExpressionUncommonField.cs
- DataStreams.cs
- CacheOutputQuery.cs
- QueryRelOp.cs
- LambdaCompiler.Generated.cs
- SchemaElementLookUpTableEnumerator.cs
- Wizard.cs
- TargetControlTypeCache.cs
- CustomTypeDescriptor.cs
- SessionSwitchEventArgs.cs
- CookieParameter.cs
- DrawingGroup.cs
- sqlpipe.cs
- NameObjectCollectionBase.cs
- CaseInsensitiveOrdinalStringComparer.cs
- ExceptionHelpers.cs
- SHA256Managed.cs
- NavigationWindow.cs
- SqlCacheDependencySection.cs
- WmlValidatorAdapter.cs