Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / textformatting / TextTrailingCharacterEllipsis.cs / 1305600 / TextTrailingCharacterEllipsis.cs
//------------------------------------------------------------------------ // // Microsoft Windows Client Platform // Copyright (C) Microsoft Corporation, 2004 // // File: TextTrailingCharacterEllipsis.cs // // Contents: Implementation of text collapsing properties for whole line trailing character ellipsis // // 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 { ////// a collapsing properties to collapse whole line toward the end /// at character granularity and with ellipsis being the collapsing symbol /// public class TextTrailingCharacterEllipsis : TextCollapsingProperties { private double _width; private TextRun _ellipsis; private const string StringHorizontalEllipsis = "\x2026"; #region Constructor ////// Construct a text trailing character ellipsis collapsing properties /// /// width in which collapsing is constrained to /// text run properties of ellispis symbol public TextTrailingCharacterEllipsis( double width, TextRunProperties textRunProperties ) { _width = width; _ellipsis = new TextCharacters(StringHorizontalEllipsis, textRunProperties); } #endregion ////// TextFormatter to get width in which specified collapsible range constrained to /// public sealed override double Width { get { return _width; } } ////// TextFormatter to get text run used as collapsing symbol /// public sealed override TextRun Symbol { get { return _ellipsis; } } ////// TextFormatter to get style of collapsing /// public sealed override TextCollapsingStyle Style { get { return TextCollapsingStyle.TrailingCharacter; } } } } // 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
- ClonableStack.cs
- SystemEvents.cs
- InvocationExpression.cs
- LogAppendAsyncResult.cs
- DrawingVisual.cs
- ApplicationGesture.cs
- Binding.cs
- RawKeyboardInputReport.cs
- DataPointer.cs
- UpdateRecord.cs
- OrthographicCamera.cs
- BuiltInExpr.cs
- WindowsFont.cs
- DataErrorValidationRule.cs
- webproxy.cs
- AnimationLayer.cs
- BitmapEffectGeneralTransform.cs
- Domain.cs
- DropDownButton.cs
- PathFigureCollectionValueSerializer.cs
- XslUrlEditor.cs
- ProtocolElementCollection.cs
- ApplicationServiceManager.cs
- ToolboxItemLoader.cs
- StdValidatorsAndConverters.cs
- WizardForm.cs
- SmtpLoginAuthenticationModule.cs
- EntityUtil.cs
- TextEndOfSegment.cs
- RotateTransform3D.cs
- MinMaxParagraphWidth.cs
- mediaeventshelper.cs
- ArrayTypeMismatchException.cs
- Int64Converter.cs
- RecipientInfo.cs
- ReferentialConstraint.cs
- TableLayout.cs
- Sequence.cs
- DropAnimation.xaml.cs
- EntityParameterCollection.cs
- ScopedKnownTypes.cs
- SID.cs
- CqlQuery.cs
- HybridDictionary.cs
- InvalidComObjectException.cs
- OracleCommandSet.cs
- PackageStore.cs
- ObjectHelper.cs
- ChannelSinkStacks.cs
- Int64AnimationUsingKeyFrames.cs
- ExceptionNotification.cs
- LogFlushAsyncResult.cs
- DataSourceSelectArguments.cs
- Imaging.cs
- FunctionUpdateCommand.cs
- CodeConstructor.cs
- SingletonChannelAcceptor.cs
- LogExtent.cs
- SHA384.cs
- HttpsTransportElement.cs
- Page.cs
- EditorResources.cs
- IriParsingElement.cs
- StylusEventArgs.cs
- TextEditorCharacters.cs
- HeaderedContentControl.cs
- RequiredFieldValidator.cs
- OrCondition.cs
- TransactionOptions.cs
- HwndSubclass.cs
- FileReservationCollection.cs
- SoapFault.cs
- EntityCommandCompilationException.cs
- TransformPattern.cs
- Shape.cs
- FilteredSchemaElementLookUpTable.cs
- DynamicRendererThreadManager.cs
- DescendantQuery.cs
- XmlCDATASection.cs
- EncryptedHeaderXml.cs
- HttpException.cs
- ProfileSection.cs
- TypedCompletedAsyncResult.cs
- LicenseException.cs
- CoTaskMemHandle.cs
- NameValuePermission.cs
- FixedPageAutomationPeer.cs
- SmiSettersStream.cs
- unitconverter.cs
- BindUriHelper.cs
- UnescapedXmlDiagnosticData.cs
- MethodBody.cs
- ListControl.cs
- GeometryCombineModeValidation.cs
- basevalidator.cs
- RequestSecurityTokenSerializer.cs
- RecordsAffectedEventArgs.cs
- LiteralControl.cs
- DbParameterCollection.cs
- grammarelement.cs