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
- RegexBoyerMoore.cs
- ThreadExceptionDialog.cs
- NotifyCollectionChangedEventArgs.cs
- NetworkCredential.cs
- XmlEncodedRawTextWriter.cs
- InteropExecutor.cs
- HtmlInputPassword.cs
- OrderedHashRepartitionStream.cs
- SQLMoneyStorage.cs
- NamedElement.cs
- FaultCode.cs
- ModelChangedEventArgsImpl.cs
- ExecutionContext.cs
- PersistenceTypeAttribute.cs
- URLAttribute.cs
- RenderTargetBitmap.cs
- OrderingExpression.cs
- BroadcastEventHelper.cs
- ChainOfResponsibility.cs
- WmlListAdapter.cs
- MappingMetadataHelper.cs
- FormsAuthenticationModule.cs
- FacetChecker.cs
- AuthenticationModulesSection.cs
- ColorAnimation.cs
- ColorConverter.cs
- HtmlInputPassword.cs
- ArrayItemValue.cs
- UniqueIdentifierService.cs
- Button.cs
- DocumentXmlWriter.cs
- JsonEnumDataContract.cs
- HtmlTernaryTree.cs
- RepeaterItemCollection.cs
- GradientBrush.cs
- SqlParameterizer.cs
- FixedNode.cs
- CheckBoxField.cs
- DecoderFallback.cs
- XmlDataSourceView.cs
- ActivityExecutorDelegateInfo.cs
- ReflectionServiceProvider.cs
- ExpandButtonVisibilityConverter.cs
- LinkConverter.cs
- MethodImplAttribute.cs
- OpCodes.cs
- TextSelectionProcessor.cs
- UnsafeNativeMethods.cs
- CachedCompositeFamily.cs
- TreePrinter.cs
- Util.cs
- TreeViewItem.cs
- EngineSiteSapi.cs
- SQLDecimalStorage.cs
- DbDataSourceEnumerator.cs
- TreeViewImageIndexConverter.cs
- IgnoreSection.cs
- ToolStripDesignerAvailabilityAttribute.cs
- HtmlShim.cs
- App.cs
- CodeCatchClauseCollection.cs
- SrgsDocumentParser.cs
- SqlPersonalizationProvider.cs
- Compiler.cs
- PathFigure.cs
- XmlILModule.cs
- VectorCollectionValueSerializer.cs
- GroupAggregateExpr.cs
- InstanceDataCollectionCollection.cs
- EditingMode.cs
- SrgsGrammarCompiler.cs
- RowCache.cs
- TextElement.cs
- QualifiedCellIdBoolean.cs
- MdImport.cs
- ResolvedKeyFrameEntry.cs
- DBConnectionString.cs
- EmptyEnumerator.cs
- XamlVector3DCollectionSerializer.cs
- KnownTypesProvider.cs
- DataTableReaderListener.cs
- HandleCollector.cs
- SimpleWorkerRequest.cs
- RemoteCryptoDecryptRequest.cs
- ImportOptions.cs
- sitestring.cs
- PropertyOverridesDialog.cs
- BitmapEffectOutputConnector.cs
- DesigntimeLicenseContext.cs
- DataServiceStreamProviderWrapper.cs
- RadioButtonRenderer.cs
- SHA512.cs
- SeparatorAutomationPeer.cs
- TranslateTransform3D.cs
- UntrustedRecipientException.cs
- CompModSwitches.cs
- HwndKeyboardInputProvider.cs
- DashStyle.cs
- StatusBarDesigner.cs
- TdsParserStaticMethods.cs