Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / textformatting / TextCollapsingProperties.cs / 1305600 / TextCollapsingProperties.cs
//------------------------------------------------------------------------
//
// Microsoft Windows Client Platform
// Copyright (C) Microsoft Corporation, 2004
//
// File: TextCollapsingProperties.cs
//
// Contents: Definition of text collapsing properties and related types
//
// 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;
namespace System.Windows.Media.TextFormatting
{
///
/// Properties of text collapsing
///
public abstract class TextCollapsingProperties
{
///
/// TextFormatter to get width in which specified collapsible range constrained to
///
public abstract double Width
{ get; }
///
/// TextFormatter to get text run used as collapsing symbol
///
public abstract TextRun Symbol
{ get; }
///
/// TextFormatter to get style of collapsing
///
public abstract TextCollapsingStyle Style
{ get; }
}
///
/// Range of characters and its width measurement where collapsing has happened within a line
///
public sealed class TextCollapsedRange
{
private int _cp;
private int _length;
private double _width;
///
/// Construct a collapsed range
///
/// first character collapsed
/// number of characters collapsed
/// total width of collapsed characters
internal TextCollapsedRange(
int cp,
int length,
double width
)
{
_cp = cp;
_length = length;
_width = width;
}
///
/// text source character index to the first character in range that is collapsed
///
public int TextSourceCharacterIndex
{
get { return _cp; }
}
///
/// number of characters collapsed
///
public int Length
{
get { return _length; }
}
///
/// total width of collapsed character range
///
public double Width
{
get { return _width; }
}
}
///
/// Text collapsing style
///
public enum TextCollapsingStyle
{
///
/// Collapse trailing characters
///
TrailingCharacter,
///
/// Collapse trailing words
///
TrailingWord,
}
}
// 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
- HelpInfo.cs
- SqlBulkCopyColumnMappingCollection.cs
- DataGridViewButtonCell.cs
- SimpleNameService.cs
- ButtonChrome.cs
- DataGridViewBindingCompleteEventArgs.cs
- CategoryGridEntry.cs
- VersionPair.cs
- MetaModel.cs
- GridViewSelectEventArgs.cs
- SpellCheck.cs
- BindingUtils.cs
- PolyQuadraticBezierSegment.cs
- UserControlParser.cs
- TypeElement.cs
- ParseNumbers.cs
- UnsafeNativeMethods.cs
- DefaultSection.cs
- MinimizableAttributeTypeConverter.cs
- Scheduler.cs
- RenderCapability.cs
- PointConverter.cs
- Canvas.cs
- HashJoinQueryOperatorEnumerator.cs
- Exceptions.cs
- DbExpressionVisitor_TResultType.cs
- GeometryValueSerializer.cs
- SqlCachedBuffer.cs
- ClientScriptItem.cs
- ReflectionHelper.cs
- SingleAnimation.cs
- BinHexDecoder.cs
- CatalogZoneBase.cs
- Unit.cs
- BitmapCodecInfo.cs
- List.cs
- SqlGenericUtil.cs
- RelatedImageListAttribute.cs
- AdornerLayer.cs
- PointConverter.cs
- WorkerRequest.cs
- ActionMismatchAddressingException.cs
- TextTreeTextNode.cs
- SizeChangedEventArgs.cs
- OleDbParameterCollection.cs
- SemanticAnalyzer.cs
- SystemThemeKey.cs
- DBConnectionString.cs
- ContentElementCollection.cs
- UserControl.cs
- ConfigXmlSignificantWhitespace.cs
- NegotiationTokenAuthenticatorState.cs
- C14NUtil.cs
- Win32Interop.cs
- Command.cs
- TextInfo.cs
- Timer.cs
- PropertyEntry.cs
- RotationValidation.cs
- CodeDomLocalizationProvider.cs
- ReadContentAsBinaryHelper.cs
- VisualBrush.cs
- SystemWebSectionGroup.cs
- ValueUtilsSmi.cs
- AssemblyInfo.cs
- EastAsianLunisolarCalendar.cs
- EdmItemCollection.OcAssemblyCache.cs
- MessageSecurityOverTcpElement.cs
- SqlGenericUtil.cs
- Stylesheet.cs
- DependentList.cs
- XmlSchemaValidationException.cs
- ListSortDescriptionCollection.cs
- ChannelSinkStacks.cs
- RowToFieldTransformer.cs
- TextPenaltyModule.cs
- FileInfo.cs
- StoragePropertyMapping.cs
- ReadOnlyTernaryTree.cs
- ThreadStateException.cs
- XmlDigitalSignatureProcessor.cs
- MediaContextNotificationWindow.cs
- DefaultParameterValueAttribute.cs
- TdsEnums.cs
- ToolStripControlHost.cs
- Helpers.cs
- HierarchicalDataSourceControl.cs
- ContainerSelectorGlyph.cs
- FileNotFoundException.cs
- EncoderFallback.cs
- PartManifestEntry.cs
- ThreadExceptionEvent.cs
- CustomCredentialPolicy.cs
- DeviceContext2.cs
- XPathNodeIterator.cs
- Helper.cs
- DbSetClause.cs
- SecurityPolicySection.cs
- ValidationSummary.cs
- ColorAnimationBase.cs