Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / System / Windows / Media / textformatting / TextTrailingWordEllipsis.cs / 1 / 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. //------------------------------------------------------------------------ // // 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
- PrtTicket_Public.cs
- SqlGenerator.cs
- OdbcDataAdapter.cs
- Asn1IntegerConverter.cs
- OutputCacheSettings.cs
- PageContentAsyncResult.cs
- CultureSpecificCharacterBufferRange.cs
- ToolStripRenderer.cs
- _IPv4Address.cs
- _LoggingObject.cs
- GuidTagList.cs
- SoapEnvelopeProcessingElement.cs
- CheckBoxList.cs
- ColumnHeaderConverter.cs
- StringArrayConverter.cs
- XmlSchemaNotation.cs
- ImageCodecInfo.cs
- ToolStripSystemRenderer.cs
- RadioButtonList.cs
- Annotation.cs
- MethodRental.cs
- DataTableReader.cs
- CollectionCodeDomSerializer.cs
- ExtensionWindowHeader.cs
- TakeQueryOptionExpression.cs
- InstancePersistenceCommandException.cs
- ConfigXmlAttribute.cs
- HwndPanningFeedback.cs
- XmlSchemaDocumentation.cs
- ContainerFilterService.cs
- EventRoute.cs
- GPPOINTF.cs
- TrackingLocation.cs
- AuthenticationServiceManager.cs
- NonVisualControlAttribute.cs
- MethodBuilderInstantiation.cs
- MulticastNotSupportedException.cs
- InputBuffer.cs
- MediaContext.cs
- _RequestCacheProtocol.cs
- StatementContext.cs
- Stackframe.cs
- AssociationSetEnd.cs
- Type.cs
- Thickness.cs
- ReliabilityContractAttribute.cs
- SQLBoolean.cs
- CommonRemoteMemoryBlock.cs
- XmlSchemaValidationException.cs
- LazyTextWriterCreator.cs
- ListViewItemSelectionChangedEvent.cs
- Imaging.cs
- ParentControlDesigner.cs
- SystemMulticastIPAddressInformation.cs
- CodeDirectiveCollection.cs
- Connector.cs
- XPathBuilder.cs
- MultiSelector.cs
- XmlSchemaSearchPattern.cs
- Win32SafeHandles.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- HttpRuntimeSection.cs
- TableRow.cs
- HexParser.cs
- ReflectPropertyDescriptor.cs
- SecurityTokenAuthenticator.cs
- StubHelpers.cs
- XsltFunctions.cs
- XmlReader.cs
- TransactionFilter.cs
- SerialReceived.cs
- TypeReference.cs
- CopyOnWriteList.cs
- PackageDigitalSignature.cs
- Int64Converter.cs
- StructuralType.cs
- Int64AnimationBase.cs
- CancelRequestedRecord.cs
- XappLauncher.cs
- PreviewPrintController.cs
- AssociationSet.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- AppSecurityManager.cs
- DataGridViewSelectedCellCollection.cs
- DataServiceSaveChangesEventArgs.cs
- WebPartConnectionsConfigureVerb.cs
- SelectionProviderWrapper.cs
- IteratorFilter.cs
- XmlDocumentFragment.cs
- RemotingException.cs
- AmbientValueAttribute.cs
- BitmapEffectInput.cs
- AsymmetricKeyExchangeDeformatter.cs
- Annotation.cs
- TemplateBamlRecordReader.cs
- MediaElement.cs
- ThreadExceptionDialog.cs
- EventEntry.cs
- DataGridTablesFactory.cs
- ScalarRestriction.cs