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
- CharacterHit.cs
- MediaCommands.cs
- BaseProcessProtocolHandler.cs
- ValidatorUtils.cs
- HttpCachePolicyElement.cs
- FunctionDefinition.cs
- ErrorEventArgs.cs
- AppSettingsExpressionEditor.cs
- BinaryParser.cs
- RegisterInfo.cs
- CustomActivityDesigner.cs
- Point3D.cs
- ItemsChangedEventArgs.cs
- ControlsConfig.cs
- Processor.cs
- ACE.cs
- ISFTagAndGuidCache.cs
- WebServiceReceive.cs
- OdbcParameterCollection.cs
- Page.cs
- RoutingExtension.cs
- FormViewUpdateEventArgs.cs
- InputLangChangeEvent.cs
- DataGridViewSelectedRowCollection.cs
- Schema.cs
- TrustLevel.cs
- SmtpReplyReader.cs
- UnknownBitmapDecoder.cs
- BooleanAnimationBase.cs
- RepeaterItemEventArgs.cs
- InheritanceUI.cs
- ControlTemplate.cs
- FragmentQuery.cs
- DeflateEmulationStream.cs
- SslSecurityTokenParameters.cs
- DebugView.cs
- EntityDescriptor.cs
- SHA384Managed.cs
- COM2ICategorizePropertiesHandler.cs
- IPAddress.cs
- ResourceDisplayNameAttribute.cs
- SequenceFullException.cs
- HebrewNumber.cs
- StreamGeometryContext.cs
- DrawingGroupDrawingContext.cs
- ProcessModelSection.cs
- DataGridViewCellConverter.cs
- DataServices.cs
- WebSysDisplayNameAttribute.cs
- SiteMapDataSourceView.cs
- WebPartHelpVerb.cs
- ColumnTypeConverter.cs
- QuaternionAnimationBase.cs
- TransformerInfo.cs
- Triplet.cs
- TextContainerHelper.cs
- BinaryWriter.cs
- ConfigurationConverterBase.cs
- METAHEADER.cs
- SqlMethodTransformer.cs
- MonitoringDescriptionAttribute.cs
- Lazy.cs
- StringFreezingAttribute.cs
- HtmlInputControl.cs
- FileSystemInfo.cs
- SrgsSemanticInterpretationTag.cs
- RectangleF.cs
- StateElementCollection.cs
- TypeBinaryExpression.cs
- SqlUDTStorage.cs
- TextDecorationUnitValidation.cs
- EntityDesignerDataSourceView.cs
- XamlBrushSerializer.cs
- GlobalizationAssembly.cs
- SqlDataReaderSmi.cs
- DelegateInArgument.cs
- TextWriter.cs
- ObjectDisposedException.cs
- FutureFactory.cs
- XLinq.cs
- PKCS1MaskGenerationMethod.cs
- EventEntry.cs
- DataGridViewColumnTypePicker.cs
- TextBoxRenderer.cs
- oledbmetadatacolumnnames.cs
- QueryExecutionOption.cs
- UpdatePanelControlTrigger.cs
- Model3D.cs
- backend.cs
- OleAutBinder.cs
- PersonalizationStateInfo.cs
- Misc.cs
- FixedElement.cs
- FunctionQuery.cs
- InputLanguageCollection.cs
- DataViewSetting.cs
- HttpChannelHelper.cs
- DataMemberFieldEditor.cs
- ButtonPopupAdapter.cs
- ToolboxItemFilterAttribute.cs