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
- ClassDataContract.cs
- XPathNodeList.cs
- OLEDB_Enum.cs
- Int64Storage.cs
- EncryptedPackageFilter.cs
- DataGridViewRowCollection.cs
- EntityFunctions.cs
- PreviewPrintController.cs
- XmlElement.cs
- Matrix.cs
- UpDownEvent.cs
- Int16AnimationBase.cs
- DataTableClearEvent.cs
- ListenDesigner.cs
- CheckBoxAutomationPeer.cs
- GroupByQueryOperator.cs
- ServiceMetadataBehavior.cs
- DynamicResourceExtensionConverter.cs
- SafeHandles.cs
- DoubleLinkListEnumerator.cs
- ApplicationId.cs
- ItemMap.cs
- TileModeValidation.cs
- ImageCodecInfoPrivate.cs
- EncryptedData.cs
- SyndicationSerializer.cs
- ConnectionConsumerAttribute.cs
- SqlTrackingQuery.cs
- StylusPointPropertyId.cs
- ContextStaticAttribute.cs
- XmlSchemaSimpleContentRestriction.cs
- FixedDocument.cs
- DataGridViewAutoSizeModeEventArgs.cs
- TryCatch.cs
- ScalarType.cs
- SelectionItemPattern.cs
- SoapExtensionImporter.cs
- TargetControlTypeAttribute.cs
- PriorityChain.cs
- GradientBrush.cs
- DataGridViewColumnConverter.cs
- X509UI.cs
- DataGridViewComboBoxColumn.cs
- TargetException.cs
- WhitespaceReader.cs
- SharedDp.cs
- DeploymentSectionCache.cs
- InfoCardSymmetricAlgorithm.cs
- CompiledXpathExpr.cs
- ToolStripItemRenderEventArgs.cs
- PropertyTabAttribute.cs
- HttpProfileGroupBase.cs
- SerTrace.cs
- CategoryNameCollection.cs
- XsdValidatingReader.cs
- ProviderMetadata.cs
- ObjectFullSpanRewriter.cs
- NamespaceDecl.cs
- LambdaCompiler.cs
- SoapAttributeAttribute.cs
- TextShapeableCharacters.cs
- XmlBufferReader.cs
- ObjectListSelectEventArgs.cs
- TemplateBindingExtension.cs
- SystemTcpStatistics.cs
- AssertFilter.cs
- SimpleMailWebEventProvider.cs
- TemplateContent.cs
- DockingAttribute.cs
- _MultipleConnectAsync.cs
- CapabilitiesSection.cs
- BufferedGraphics.cs
- MissingMethodException.cs
- TransactionsSectionGroup.cs
- ToolCreatedEventArgs.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- FilteredAttributeCollection.cs
- DocumentGridContextMenu.cs
- WindowsListViewItemStartMenu.cs
- AppDomainCompilerProxy.cs
- IconEditor.cs
- DataSetViewSchema.cs
- FrameworkElementAutomationPeer.cs
- DispatcherEventArgs.cs
- Int32AnimationBase.cs
- RsaSecurityKey.cs
- XmlAttributeCollection.cs
- SubpageParaClient.cs
- FormatterServicesNoSerializableCheck.cs
- TextPointerBase.cs
- Scanner.cs
- SoapAttributeOverrides.cs
- UnionCodeGroup.cs
- DataGridViewCell.cs
- CategoryAttribute.cs
- EventLogLink.cs
- FreezableCollection.cs
- FakeModelPropertyImpl.cs
- EnterpriseServicesHelper.cs
- EllipseGeometry.cs