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
- XmlConvert.cs
- ConstNode.cs
- InheritanceAttribute.cs
- MenuAutomationPeer.cs
- CroppedBitmap.cs
- BaseUriHelper.cs
- WebServiceTypeData.cs
- StringUtil.cs
- BinaryNode.cs
- loginstatus.cs
- FixedSOMContainer.cs
- SkinBuilder.cs
- LinearKeyFrames.cs
- CodeAccessPermission.cs
- WindowsRichEdit.cs
- FileChangesMonitor.cs
- PointAnimationClockResource.cs
- TextRangeEdit.cs
- WebPartEditorApplyVerb.cs
- RectAnimationUsingKeyFrames.cs
- NavigateEvent.cs
- SystemDiagnosticsSection.cs
- ErrorTableItemStyle.cs
- NetworkStream.cs
- InlineObject.cs
- SchemaConstraints.cs
- CheckBoxFlatAdapter.cs
- BulletedList.cs
- ReaderWriterLockWrapper.cs
- HtmlHead.cs
- FormsAuthentication.cs
- Table.cs
- RenderingEventArgs.cs
- WeakReferenceEnumerator.cs
- SafeCryptHandles.cs
- ToolStripStatusLabel.cs
- DecimalStorage.cs
- QilUnary.cs
- EmptyEnumerator.cs
- InstanceDataCollectionCollection.cs
- GraphicsState.cs
- IEnumerable.cs
- PagerStyle.cs
- WeakReadOnlyCollection.cs
- CalloutQueueItem.cs
- FileInfo.cs
- InnerItemCollectionView.cs
- DataControlPagerLinkButton.cs
- DataKeyArray.cs
- ActivityExecutor.cs
- QueryExpr.cs
- StringFreezingAttribute.cs
- CustomAttributeSerializer.cs
- CompositionCommandSet.cs
- MachineKeyConverter.cs
- XmlKeywords.cs
- PropertyContainer.cs
- XmlKeywords.cs
- DocumentAutomationPeer.cs
- HashMembershipCondition.cs
- CreatingCookieEventArgs.cs
- PolicyStatement.cs
- SelectingProviderEventArgs.cs
- CatalogPartCollection.cs
- OleAutBinder.cs
- TimeStampChecker.cs
- ToolStripManager.cs
- Menu.cs
- AbstractExpressions.cs
- CodeEventReferenceExpression.cs
- SpellerStatusTable.cs
- __Filters.cs
- FileIOPermission.cs
- nulltextnavigator.cs
- FunctionUpdateCommand.cs
- ImageField.cs
- BindingValueChangedEventArgs.cs
- StrokeNodeData.cs
- PageBuildProvider.cs
- NameValueFileSectionHandler.cs
- WebPartConnectionsConfigureVerb.cs
- DispatcherHooks.cs
- CodePageUtils.cs
- HierarchicalDataSourceControl.cs
- RegexMatch.cs
- ScriptControlManager.cs
- TypeInfo.cs
- TypeBuilder.cs
- EntityDataSourceChangedEventArgs.cs
- ExpressionVisitor.cs
- InstancePersistenceCommand.cs
- ISSmlParser.cs
- COM2FontConverter.cs
- StrongNameIdentityPermission.cs
- DataRowChangeEvent.cs
- IdentityModelDictionary.cs
- ColorEditor.cs
- ControlParameter.cs
- RtfFormatStack.cs
- _FtpControlStream.cs