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
- PropertyGrid.cs
- TransformerTypeCollection.cs
- BindingElementCollection.cs
- ObjectQueryExecutionPlan.cs
- DesignerSerializationOptionsAttribute.cs
- HttpRawResponse.cs
- WindowsGraphics.cs
- BrushValueSerializer.cs
- BufferBuilder.cs
- XhtmlConformanceSection.cs
- Root.cs
- IndentedWriter.cs
- CriticalFinalizerObject.cs
- VisualStyleElement.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- BindValidator.cs
- ListBoxItem.cs
- ZipIOExtraField.cs
- BufferedGraphicsContext.cs
- COAUTHIDENTITY.cs
- ToolStripPanelDesigner.cs
- OpCopier.cs
- FontSourceCollection.cs
- InkCanvasInnerCanvas.cs
- WorkflowElementDialog.cs
- COM2TypeInfoProcessor.cs
- FileChangesMonitor.cs
- ClientOptions.cs
- ContextStaticAttribute.cs
- CreateUserErrorEventArgs.cs
- InfoCardBaseException.cs
- WindowsUpDown.cs
- TrustDriver.cs
- AssemblyBuilder.cs
- ConfigXmlReader.cs
- DbException.cs
- FunctionParameter.cs
- SessionStateSection.cs
- QueryReaderSettings.cs
- PointLight.cs
- CriticalFinalizerObject.cs
- TextureBrush.cs
- SqlTrackingWorkflowInstance.cs
- HMAC.cs
- HttpApplicationFactory.cs
- MenuItemStyleCollection.cs
- StylusPlugInCollection.cs
- RepeaterItemCollection.cs
- XmlWriter.cs
- RoutedEventHandlerInfo.cs
- StorageScalarPropertyMapping.cs
- HttpProfileGroupBase.cs
- DrawingAttributesDefaultValueFactory.cs
- TypeForwardedToAttribute.cs
- StaticDataManager.cs
- DbParameterCollectionHelper.cs
- BitmapEffectGroup.cs
- SystemWebSectionGroup.cs
- TextParagraphCache.cs
- BoolExpression.cs
- WebPartDescription.cs
- InvalidOleVariantTypeException.cs
- ConfigXmlElement.cs
- DataSourceView.cs
- Margins.cs
- GeometryConverter.cs
- InstallerTypeAttribute.cs
- ClaimSet.cs
- CannotUnloadAppDomainException.cs
- RenameRuleObjectDialog.Designer.cs
- XPathSelectionIterator.cs
- _ProxyRegBlob.cs
- MostlySingletonList.cs
- HandlerBase.cs
- _HeaderInfoTable.cs
- TaiwanLunisolarCalendar.cs
- ModifierKeysConverter.cs
- DesignOnlyAttribute.cs
- followingsibling.cs
- EncoderFallback.cs
- MemberBinding.cs
- MinimizableAttributeTypeConverter.cs
- InputBinder.cs
- ScriptResourceAttribute.cs
- MultiByteCodec.cs
- ListView.cs
- FontWeightConverter.cs
- ParentControlDesigner.cs
- DeclarationUpdate.cs
- ExpressionEditorAttribute.cs
- WorkflowDesignerMessageFilter.cs
- NameValuePermission.cs
- StrokeNodeOperations2.cs
- XmlObjectSerializerContext.cs
- WindowsUpDown.cs
- PersonalizationProviderCollection.cs
- IsolationInterop.cs
- ObjectDataSourceMethodEditor.cs
- HyperLinkField.cs
- DataRowChangeEvent.cs