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
- ToolStripRendererSwitcher.cs
- DataTableMappingCollection.cs
- ActiveXSite.cs
- OracleEncoding.cs
- ListItemParagraph.cs
- WsdlImporterElement.cs
- PartManifestEntry.cs
- DoWhileDesigner.xaml.cs
- FileUtil.cs
- ToolStripLabel.cs
- PersianCalendar.cs
- GeneratedView.cs
- MobileTextWriter.cs
- ProviderConnectionPoint.cs
- SortDescriptionCollection.cs
- securitymgrsite.cs
- StringAnimationUsingKeyFrames.cs
- CurrentChangingEventArgs.cs
- CollectionViewGroupInternal.cs
- XslNumber.cs
- ItemContainerGenerator.cs
- PeerTransportSecurityElement.cs
- AsyncResult.cs
- ImportCatalogPart.cs
- HorizontalAlignConverter.cs
- OdbcConnection.cs
- RepeatBehaviorConverter.cs
- VisualBasicReference.cs
- OdbcCommandBuilder.cs
- FormViewRow.cs
- ConfigPathUtility.cs
- ApplicationServiceManager.cs
- XmlSchemaSimpleType.cs
- XmlParser.cs
- ParameterModifier.cs
- DES.cs
- HebrewNumber.cs
- GatewayDefinition.cs
- MemberAccessException.cs
- LocalizationCodeDomSerializer.cs
- HandlerWithFactory.cs
- UrlPath.cs
- PropertyGrid.cs
- OracleConnection.cs
- MetadataArtifactLoaderComposite.cs
- StackOverflowException.cs
- StringStorage.cs
- DirectionalLight.cs
- ClientBuildManagerCallback.cs
- DataGridParentRows.cs
- ImpersonationContext.cs
- CommonProperties.cs
- RequiredFieldValidator.cs
- IgnoreFlushAndCloseStream.cs
- ParameterToken.cs
- SiteMapDataSourceDesigner.cs
- PrimitiveXmlSerializers.cs
- Collection.cs
- Double.cs
- DataRowExtensions.cs
- OpenFileDialog.cs
- XmlConvert.cs
- NameValueCollection.cs
- PropertySet.cs
- DataGridViewCellStateChangedEventArgs.cs
- RadioButtonFlatAdapter.cs
- NamedElement.cs
- Point3DConverter.cs
- UnhandledExceptionEventArgs.cs
- CustomErrorCollection.cs
- XmlIgnoreAttribute.cs
- EventHandlerList.cs
- UInt64Storage.cs
- OdbcConnectionHandle.cs
- PropertyFilterAttribute.cs
- OAVariantLib.cs
- ImageListDesigner.cs
- ThicknessAnimationBase.cs
- PropertyCondition.cs
- XmlCharCheckingWriter.cs
- UpDownEvent.cs
- FilteredDataSetHelper.cs
- EventManager.cs
- PerformanceCounterPermissionEntryCollection.cs
- MetadataCollection.cs
- SimpleMailWebEventProvider.cs
- Package.cs
- _ScatterGatherBuffers.cs
- CompositeControl.cs
- SchemaElementLookUpTable.cs
- CodeObject.cs
- SchemaLookupTable.cs
- xmlglyphRunInfo.cs
- Point.cs
- AnchorEditor.cs
- ErrorInfoXmlDocument.cs
- ReceiveMessageRecord.cs
- KeyGesture.cs
- ComplexPropertyEntry.cs
- DataColumnMappingCollection.cs