Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / textformatting / TextTrailingWordEllipsis.cs / 1305600 / TextTrailingWordEllipsis.cs
//------------------------------------------------------------------------ // // Microsoft Windows Client Platform // Copyright (C) Microsoft Corporation, 2004 // // File: TextTrailingWordEllipsis.cs // // Contents: Implementation of text collapsing properties for whole line trailing word 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 word granularity and with ellipsis being the collapsing symbol /// public class TextTrailingWordEllipsis : TextCollapsingProperties { private double _width; private TextRun _ellipsis; private const string StringHorizontalEllipsis = "\x2026"; #region Constructor ////// Construct a text trailing word ellipsis collapsing properties /// /// width in which collapsing is constrained to /// text run properties of ellispis symbol public TextTrailingWordEllipsis( 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.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
- ConnectionInterfaceCollection.cs
- XmlSchemaSimpleTypeRestriction.cs
- CommandConverter.cs
- ServiceMetadataExtension.cs
- PageStatePersister.cs
- MeasurementDCInfo.cs
- ComponentChangingEvent.cs
- UniqueID.cs
- TimeSpanValidator.cs
- MediaScriptCommandRoutedEventArgs.cs
- XNodeSchemaApplier.cs
- DataGridColumnHeaderCollection.cs
- RouteValueExpressionBuilder.cs
- CodeGeneratorAttribute.cs
- WindowsListViewGroup.cs
- TransformerTypeCollection.cs
- XPathDocumentIterator.cs
- SettingsContext.cs
- GenericWebPart.cs
- ArcSegment.cs
- XmlEntityReference.cs
- LinqDataSourceUpdateEventArgs.cs
- ReadOnlyDataSourceView.cs
- HtmlHistory.cs
- CompoundFileStorageReference.cs
- AdornedElementPlaceholder.cs
- UTF8Encoding.cs
- OracleDataReader.cs
- MultipleCopiesCollection.cs
- SrgsText.cs
- Int64Animation.cs
- HyperlinkAutomationPeer.cs
- XmlSchemaDocumentation.cs
- ResourceDisplayNameAttribute.cs
- Int32Collection.cs
- EditorZoneBase.cs
- HtmlMeta.cs
- InputLanguageProfileNotifySink.cs
- NativeMethods.cs
- LedgerEntry.cs
- ObjectDataSourceSelectingEventArgs.cs
- OperationAbortedException.cs
- BamlBinaryReader.cs
- ExceptQueryOperator.cs
- XPathBinder.cs
- Attributes.cs
- XmlSchemaSimpleContentRestriction.cs
- ExpressionVisitor.cs
- DesignerEventService.cs
- SQLBinary.cs
- BamlCollectionHolder.cs
- XmlObjectSerializerReadContextComplex.cs
- ExpandoClass.cs
- SocketInformation.cs
- PeerTransportCredentialType.cs
- Attributes.cs
- TextServicesDisplayAttributePropertyRanges.cs
- EncoderNLS.cs
- TreeView.cs
- CodeVariableReferenceExpression.cs
- ReadOnlyHierarchicalDataSource.cs
- SqlCacheDependency.cs
- RequestQueryParser.cs
- WorkflowServiceAttributesTypeConverter.cs
- RestClientProxyHandler.cs
- ParagraphResult.cs
- WorkflowInspectionServices.cs
- ToolStripContainer.cs
- ArgIterator.cs
- FontNamesConverter.cs
- IndexerHelper.cs
- TypedElement.cs
- X509SubjectKeyIdentifierClause.cs
- HiddenFieldPageStatePersister.cs
- AxisAngleRotation3D.cs
- AuthorizationRule.cs
- SettingsPropertyCollection.cs
- Hashtable.cs
- NavigationProperty.cs
- CollectionBuilder.cs
- PermissionSet.cs
- XmlQuerySequence.cs
- WebBrowser.cs
- MenuAutoFormat.cs
- DisplayInformation.cs
- SplashScreenNativeMethods.cs
- LiteralText.cs
- BeginStoryboard.cs
- StateRuntime.cs
- DragStartedEventArgs.cs
- XmlCDATASection.cs
- UIElementCollection.cs
- LocalizableAttribute.cs
- DataObjectPastingEventArgs.cs
- ManagedFilter.cs
- TCEAdapterGenerator.cs
- ImageCodecInfoPrivate.cs
- MetricEntry.cs
- PropertyEntry.cs
- PolicyManager.cs