Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / textformatting / TextTrailingCharacterEllipsis.cs / 1305600 / 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
- HiddenField.cs
- BrowserTree.cs
- VerificationAttribute.cs
- XpsFilter.cs
- AnnotationService.cs
- DetailsViewCommandEventArgs.cs
- UdpSocket.cs
- DocobjHost.cs
- StrongNameMembershipCondition.cs
- _AcceptOverlappedAsyncResult.cs
- CallTemplateAction.cs
- BitmapEffectvisualstate.cs
- SafeMarshalContext.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- CommandHelper.cs
- IxmlLineInfo.cs
- EditingCoordinator.cs
- RewritingPass.cs
- webclient.cs
- DependencySource.cs
- HighlightComponent.cs
- GroupQuery.cs
- Invariant.cs
- PointLight.cs
- DigitShape.cs
- HashMembershipCondition.cs
- Queue.cs
- ImageButton.cs
- ComplexTypeEmitter.cs
- UnmanagedMarshal.cs
- FloatUtil.cs
- ModuleConfigurationInfo.cs
- GPPOINTF.cs
- SlotInfo.cs
- VariableDesigner.xaml.cs
- XPathNavigator.cs
- PowerModeChangedEventArgs.cs
- SelectingProviderEventArgs.cs
- WebExceptionStatus.cs
- FillRuleValidation.cs
- ExpressionBuilder.cs
- ReflectEventDescriptor.cs
- ListViewGroupConverter.cs
- BitmapDownload.cs
- CachedCompositeFamily.cs
- ObjectStateFormatter.cs
- ResourceProperty.cs
- ProfileSettingsCollection.cs
- Figure.cs
- DockingAttribute.cs
- AndCondition.cs
- HandlerBase.cs
- Processor.cs
- WmlControlAdapter.cs
- TabRenderer.cs
- RequestCacheValidator.cs
- UnionCodeGroup.cs
- SqlCacheDependencySection.cs
- LinqDataSourceInsertEventArgs.cs
- HttpRequestCacheValidator.cs
- ObjectNotFoundException.cs
- MorphHelper.cs
- InvalidComObjectException.cs
- DataGridState.cs
- TrackingValidationObjectDictionary.cs
- QueryExpr.cs
- IdnElement.cs
- ContextStack.cs
- ResXResourceWriter.cs
- XamlReader.cs
- ActivationService.cs
- _AutoWebProxyScriptEngine.cs
- NotCondition.cs
- GlyphElement.cs
- TextSegment.cs
- NetworkInformationException.cs
- ConsoleCancelEventArgs.cs
- WsrmTraceRecord.cs
- RenderingBiasValidation.cs
- RowUpdatingEventArgs.cs
- QueryRewriter.cs
- WinInetCache.cs
- OnOperation.cs
- StringValueConverter.cs
- WindowsGrip.cs
- Rotation3DAnimationUsingKeyFrames.cs
- TriggerActionCollection.cs
- SubMenuStyle.cs
- Win32KeyboardDevice.cs
- Literal.cs
- Component.cs
- ListSourceHelper.cs
- DataGridSortCommandEventArgs.cs
- _FtpControlStream.cs
- WebEvents.cs
- TripleDES.cs
- WindowsGrip.cs
- Socket.cs
- ISO2022Encoding.cs
- GlobalProxySelection.cs