Code:
/ 4.0 / 4.0 / 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.
//------------------------------------------------------------------------
//
// 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
- UserPersonalizationStateInfo.cs
- MediaEntryAttribute.cs
- DiscoveryEndpointValidator.cs
- ToolStripSplitStackLayout.cs
- StatusBarItemAutomationPeer.cs
- ScriptRef.cs
- MD5Cng.cs
- XmlUtf8RawTextWriter.cs
- UrlMappingCollection.cs
- ExtenderControl.cs
- ReturnEventArgs.cs
- ArgumentValidation.cs
- ThreadStateException.cs
- Vector3D.cs
- EnumType.cs
- ViewStateException.cs
- CuspData.cs
- TrackingStringDictionary.cs
- NativeCppClassAttribute.cs
- parserscommon.cs
- QueryContinueDragEventArgs.cs
- ComAdminInterfaces.cs
- CodeTypeDeclaration.cs
- TypeGeneratedEventArgs.cs
- ObjectStateManagerMetadata.cs
- BehaviorEditorPart.cs
- AssemblyNameProxy.cs
- XmlDictionaryString.cs
- NotImplementedException.cs
- AttributeEmitter.cs
- TextPointerBase.cs
- PointLight.cs
- BamlLocalizabilityResolver.cs
- ButtonChrome.cs
- SplashScreenNativeMethods.cs
- ButtonFieldBase.cs
- SID.cs
- SqlProvider.cs
- _NegotiateClient.cs
- ConsoleCancelEventArgs.cs
- IntPtr.cs
- ToolboxItemCollection.cs
- PageSetupDialog.cs
- PersistencePipeline.cs
- CollectionChangeEventArgs.cs
- ServicePoint.cs
- SqlDataSourceCommandEventArgs.cs
- PostBackOptions.cs
- CLSCompliantAttribute.cs
- MultilineStringConverter.cs
- DataGridAddNewRow.cs
- HtmlInputSubmit.cs
- HwndSourceParameters.cs
- StaticResourceExtension.cs
- Wizard.cs
- WindowsToolbarAsMenu.cs
- CellQuery.cs
- _NestedSingleAsyncResult.cs
- TypeElement.cs
- CallContext.cs
- WindowsImpersonationContext.cs
- CultureInfoConverter.cs
- PublisherIdentityPermission.cs
- DelayedRegex.cs
- ImageAttributes.cs
- DrawingVisual.cs
- CompoundFileIOPermission.cs
- ScriptMethodAttribute.cs
- DragDrop.cs
- DesignerForm.cs
- ExtenderControl.cs
- BinaryObjectWriter.cs
- _CommandStream.cs
- BamlLocalizableResourceKey.cs
- __TransparentProxy.cs
- CodeDomLoader.cs
- _NegoState.cs
- UdpReplyToBehavior.cs
- AQNBuilder.cs
- Options.cs
- CopyOfAction.cs
- BaseTreeIterator.cs
- DataRelationPropertyDescriptor.cs
- BrowserDefinition.cs
- DbParameterHelper.cs
- LogPolicy.cs
- XmlSchemas.cs
- EntitySqlQueryState.cs
- CellNormalizer.cs
- WebRequestModulesSection.cs
- Transform3D.cs
- ResXBuildProvider.cs
- MessageEncodingBindingElement.cs
- PathFigureCollectionConverter.cs
- PrtCap_Public.cs
- ProfileModule.cs
- SafeNativeMethodsOther.cs
- FileAuthorizationModule.cs
- EntityCommandDefinition.cs
- RadioButtonFlatAdapter.cs