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
- FacetDescriptionElement.cs
- WebPartActionVerb.cs
- SqlBuffer.cs
- BoundPropertyEntry.cs
- ScriptControl.cs
- ValidationManager.cs
- ControlCommandSet.cs
- SQLInt16Storage.cs
- securestring.cs
- PropertyChangingEventArgs.cs
- Point3DKeyFrameCollection.cs
- ContentOperations.cs
- CommonGetThemePartSize.cs
- KeyFrames.cs
- ProcessInfo.cs
- XmlSchemaAppInfo.cs
- ToolTipService.cs
- IconBitmapDecoder.cs
- ScrollViewer.cs
- ArrayListCollectionBase.cs
- ProfileEventArgs.cs
- Scalars.cs
- ProviderBase.cs
- ListSourceHelper.cs
- FacetDescriptionElement.cs
- MailWriter.cs
- StorageEntitySetMapping.cs
- FrameworkElementAutomationPeer.cs
- MetadataArtifactLoaderResource.cs
- SessionIDManager.cs
- CollectionViewGroupInternal.cs
- BufferedGraphicsContext.cs
- Italic.cs
- EntityCollection.cs
- SerializationInfo.cs
- COM2Enum.cs
- SkewTransform.cs
- ToolStripCollectionEditor.cs
- AsyncContentLoadedEventArgs.cs
- SpellCheck.cs
- Vector.cs
- ParamArrayAttribute.cs
- ExternalCalls.cs
- TypeViewSchema.cs
- _CookieModule.cs
- TypeDescriptor.cs
- _ShellExpression.cs
- ComponentResourceKey.cs
- InvariantComparer.cs
- StrongNameIdentityPermission.cs
- AllowedAudienceUriElement.cs
- RadioButton.cs
- IdentityManager.cs
- FilteredDataSetHelper.cs
- VScrollBar.cs
- VisualBasicReference.cs
- ServerProtocol.cs
- TagNameToTypeMapper.cs
- IndexedString.cs
- storepermissionattribute.cs
- ListControlDesigner.cs
- SByte.cs
- ReachVisualSerializerAsync.cs
- PreparingEnlistment.cs
- DrawingGroupDrawingContext.cs
- DocumentSequenceHighlightLayer.cs
- TextEditorCharacters.cs
- InvalidEnumArgumentException.cs
- RuntimeVariablesExpression.cs
- CopyOfAction.cs
- RMEnrollmentPage2.cs
- DropDownButton.cs
- XmlSchemaCollection.cs
- WebSysDescriptionAttribute.cs
- NonParentingControl.cs
- CommandExpr.cs
- HasActivatableWorkflowEvent.cs
- _SingleItemRequestCache.cs
- FormViewInsertEventArgs.cs
- DiscoveryDocumentSearchPattern.cs
- TextViewDesigner.cs
- SqlCachedBuffer.cs
- MultipartContentParser.cs
- DataException.cs
- DataGridViewRowEventArgs.cs
- ProcessManager.cs
- UriExt.cs
- CultureNotFoundException.cs
- BrushMappingModeValidation.cs
- DataGridClipboardCellContent.cs
- XmlDeclaration.cs
- MatrixAnimationBase.cs
- TemplateBindingExpressionConverter.cs
- XmlWrappingReader.cs
- XmlNodeReader.cs
- X509WindowsSecurityToken.cs
- ContextBase.cs
- MenuStrip.cs
- ColumnMap.cs
- BlockCollection.cs