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
- RouteValueExpressionBuilder.cs
- ELinqQueryState.cs
- MenuItem.cs
- SettingsPropertyCollection.cs
- ColorTranslator.cs
- UpdatePanelControlTrigger.cs
- GridSplitterAutomationPeer.cs
- LongValidator.cs
- SimpleNameService.cs
- Lasso.cs
- SHA384CryptoServiceProvider.cs
- PersistChildrenAttribute.cs
- UniqueEventHelper.cs
- NamespaceListProperty.cs
- MethodRental.cs
- PropertyValue.cs
- TextRenderer.cs
- PersonalizationProviderCollection.cs
- ContentDisposition.cs
- JavaScriptObjectDeserializer.cs
- BrushMappingModeValidation.cs
- SrgsElementList.cs
- SQLInt32Storage.cs
- TdsParser.cs
- AsymmetricSecurityProtocolFactory.cs
- CodeIdentifiers.cs
- ToolStripArrowRenderEventArgs.cs
- ObjectViewEntityCollectionData.cs
- BrowserDefinition.cs
- UnsafeNativeMethods.cs
- SessionState.cs
- InternalConfigConfigurationFactory.cs
- CryptoStream.cs
- SmtpClient.cs
- PropertyItemInternal.cs
- InstancePersistenceException.cs
- MaskInputRejectedEventArgs.cs
- TextServicesDisplayAttributePropertyRanges.cs
- MediaElement.cs
- LowerCaseStringConverter.cs
- PrimitiveType.cs
- LayoutSettings.cs
- StylusCollection.cs
- EdmPropertyAttribute.cs
- XPathSingletonIterator.cs
- ComplexBindingPropertiesAttribute.cs
- CmsUtils.cs
- ScrollData.cs
- KeyNotFoundException.cs
- CookieProtection.cs
- EndpointConfigContainer.cs
- TextEmbeddedObject.cs
- LineProperties.cs
- MethodImplAttribute.cs
- DocumentScope.cs
- WebServiceTypeData.cs
- ObfuscationAttribute.cs
- LinqExpressionNormalizer.cs
- CollectionsUtil.cs
- SortKey.cs
- NamedPipeTransportBindingElement.cs
- ModelServiceImpl.cs
- MiniParameterInfo.cs
- WebServiceHandlerFactory.cs
- TextEditorSpelling.cs
- WMICapabilities.cs
- BinaryReader.cs
- FrameworkElement.cs
- SharedPerformanceCounter.cs
- Helpers.cs
- TreeViewHitTestInfo.cs
- TransformPatternIdentifiers.cs
- MenuItemStyle.cs
- CompilationLock.cs
- Sentence.cs
- DelegatingTypeDescriptionProvider.cs
- InputLanguageCollection.cs
- ISFTagAndGuidCache.cs
- ScrollBarRenderer.cs
- HttpBrowserCapabilitiesBase.cs
- TTSVoice.cs
- ResolveCompletedEventArgs.cs
- ThicknessAnimation.cs
- ColorInterpolationModeValidation.cs
- ContractBase.cs
- printdlgexmarshaler.cs
- SQLGuid.cs
- DictionaryManager.cs
- SecurityElement.cs
- XslCompiledTransform.cs
- TextServicesCompartmentEventSink.cs
- DbFunctionCommandTree.cs
- XmlCountingReader.cs
- ToolStripLocationCancelEventArgs.cs
- XmlSchemaCollection.cs
- VectorAnimationBase.cs
- FacetDescriptionElement.cs
- DataSetMappper.cs
- DateTimeFormatInfo.cs
- StartUpEventArgs.cs