Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / Media / textformatting / TextTrailingCharacterEllipsis.cs / 1 / 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. //------------------------------------------------------------------------ // // 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
- LOSFormatter.cs
- MetabaseServerConfig.cs
- DataServiceExpressionVisitor.cs
- WebBrowsableAttribute.cs
- MsmqMessageProperty.cs
- CacheEntry.cs
- codemethodreferenceexpression.cs
- XmlSchemaType.cs
- RootBrowserWindow.cs
- ExpressionConverter.cs
- ActivityScheduledRecord.cs
- HMACSHA1.cs
- TrackingServices.cs
- MethodExpression.cs
- BmpBitmapEncoder.cs
- DesignerUtility.cs
- ChineseLunisolarCalendar.cs
- NumericUpDownAccelerationCollection.cs
- DataColumnPropertyDescriptor.cs
- DeploymentSection.cs
- CodeTypeDeclarationCollection.cs
- HelpKeywordAttribute.cs
- RelationshipEndCollection.cs
- ParserContext.cs
- GridViewColumn.cs
- ClientSession.cs
- AttributeQuery.cs
- oledbmetadatacolumnnames.cs
- DataGridView.cs
- PrintDocument.cs
- EditingScope.cs
- ScriptControlDescriptor.cs
- _Semaphore.cs
- IMembershipProvider.cs
- TPLETWProvider.cs
- LineServices.cs
- CodePrimitiveExpression.cs
- AsymmetricSignatureDeformatter.cs
- DayRenderEvent.cs
- XPathAncestorIterator.cs
- SynchronizationContext.cs
- CharacterMetricsDictionary.cs
- FixUp.cs
- WebConfigurationManager.cs
- BitmapEncoder.cs
- BitmapData.cs
- TransactionOptions.cs
- LayoutEditorPart.cs
- GiveFeedbackEvent.cs
- Pens.cs
- SerializationSectionGroup.cs
- WebServiceData.cs
- SchemaImporterExtensionElement.cs
- SQLString.cs
- TabItemAutomationPeer.cs
- Point.cs
- EventProvider.cs
- SQLString.cs
- UnmanagedMarshal.cs
- AnnotationResourceChangedEventArgs.cs
- HtmlUtf8RawTextWriter.cs
- PerspectiveCamera.cs
- XmlSchemaException.cs
- SystemTcpStatistics.cs
- CheckBox.cs
- Part.cs
- TypefaceMap.cs
- WorkflowMarkupSerializationManager.cs
- TypeNameConverter.cs
- MenuTracker.cs
- DBSchemaTable.cs
- RemotingSurrogateSelector.cs
- EmptyReadOnlyDictionaryInternal.cs
- UpDownBase.cs
- ObjectManager.cs
- SourceFileInfo.cs
- Menu.cs
- SetState.cs
- ListView.cs
- SamlEvidence.cs
- X509WindowsSecurityToken.cs
- CodeIdentifier.cs
- StreamGeometry.cs
- ShaderEffect.cs
- Style.cs
- ClientCultureInfo.cs
- MouseGestureValueSerializer.cs
- Operators.cs
- HttpClientChannel.cs
- InputScope.cs
- ObjectListCommand.cs
- NamespaceQuery.cs
- ObjectDataSource.cs
- wgx_render.cs
- BitmapMetadataEnumerator.cs
- TrackingQuery.cs
- HwndSubclass.cs
- CodeLinePragma.cs
- TextServicesPropertyRanges.cs
- LoginName.cs