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
- ThreadStateException.cs
- BooleanProjectedSlot.cs
- Pair.cs
- HtmlTable.cs
- StringUtil.cs
- CaretElement.cs
- CheckedListBox.cs
- Site.cs
- EvidenceBase.cs
- XmlName.cs
- BatchServiceHost.cs
- IntranetCredentialPolicy.cs
- ResourceDictionary.cs
- FlowDocumentView.cs
- IgnoreFlushAndCloseStream.cs
- lengthconverter.cs
- ContractNamespaceAttribute.cs
- HttpRuntimeSection.cs
- XmlSerializerNamespaces.cs
- MachinePropertyVariants.cs
- ReflectionTypeLoadException.cs
- GridViewHeaderRowPresenter.cs
- NativeMethods.cs
- CompilerResults.cs
- DecimalConstantAttribute.cs
- CapiSafeHandles.cs
- Matrix.cs
- ADMembershipUser.cs
- PageCatalogPart.cs
- EnterpriseServicesHelper.cs
- FileLogRecordEnumerator.cs
- TransactionTraceIdentifier.cs
- FragmentNavigationEventArgs.cs
- Stylesheet.cs
- PageHandlerFactory.cs
- VisualStyleTypesAndProperties.cs
- PreviewPrintController.cs
- DefaultTextStoreTextComposition.cs
- OuterGlowBitmapEffect.cs
- HistoryEventArgs.cs
- SafeArrayRankMismatchException.cs
- OrderedEnumerableRowCollection.cs
- ComplusEndpointConfigContainer.cs
- MessageBox.cs
- SiteMapSection.cs
- TextRenderer.cs
- ImageDrawing.cs
- Object.cs
- RectangleGeometry.cs
- XamlPointCollectionSerializer.cs
- XsltException.cs
- ExtensionSimplifierMarkupObject.cs
- InheritanceRules.cs
- DbConvert.cs
- ManifestResourceInfo.cs
- DiffuseMaterial.cs
- TextModifier.cs
- AutomationAttributeInfo.cs
- DataGridViewHeaderCell.cs
- PropertyMappingExceptionEventArgs.cs
- SmtpCommands.cs
- DebugView.cs
- HMACSHA256.cs
- StyleXamlTreeBuilder.cs
- Merger.cs
- XmlSecureResolver.cs
- ImageMapEventArgs.cs
- EnumerableCollectionView.cs
- SchemaSetCompiler.cs
- FileDialogPermission.cs
- ACL.cs
- FactoryGenerator.cs
- PropertyNames.cs
- _OverlappedAsyncResult.cs
- XmlSchemas.cs
- FormViewCommandEventArgs.cs
- HttpServerUtilityWrapper.cs
- CommonProperties.cs
- WindowsGraphics.cs
- StateDesigner.LayoutSelectionGlyph.cs
- XmlNamedNodeMap.cs
- Panel.cs
- WindowsListViewGroup.cs
- IPipelineRuntime.cs
- PassportAuthenticationModule.cs
- ILGenerator.cs
- SqlTrackingWorkflowInstance.cs
- HttpException.cs
- LabelLiteral.cs
- DecimalMinMaxAggregationOperator.cs
- DeobfuscatingStream.cs
- RoleService.cs
- ModulesEntry.cs
- MailWebEventProvider.cs
- ComponentCommands.cs
- IsolatedStorageException.cs
- WebPartTransformer.cs
- TableParaClient.cs
- TcpConnectionPool.cs
- SelfIssuedAuthRSAPKCS1SignatureFormatter.cs