Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- MultitargetingHelpers.cs
- TreeBuilderXamlTranslator.cs
- RefreshEventArgs.cs
- MediaContext.cs
- SpoolingTaskBase.cs
- TypeConverterMarkupExtension.cs
- _LocalDataStore.cs
- LoadGrammarCompletedEventArgs.cs
- ValueTypeFixupInfo.cs
- CodeConditionStatement.cs
- WebScriptEnablingElement.cs
- GridToolTip.cs
- altserialization.cs
- PrePostDescendentsWalker.cs
- ControlPager.cs
- ActivityTypeCodeDomSerializer.cs
- BCLDebug.cs
- LayoutExceptionEventArgs.cs
- Matrix3DConverter.cs
- ReflectTypeDescriptionProvider.cs
- AdCreatedEventArgs.cs
- PagedDataSource.cs
- BitmapCache.cs
- SystemIPInterfaceProperties.cs
- LassoSelectionBehavior.cs
- DesignTableCollection.cs
- TdsRecordBufferSetter.cs
- UndoManager.cs
- DescendentsWalkerBase.cs
- DbProviderFactories.cs
- TreeNodeStyleCollection.cs
- DesignerActionTextItem.cs
- ResourceReader.cs
- VectorCollectionValueSerializer.cs
- SettingsSavedEventArgs.cs
- SmtpDigestAuthenticationModule.cs
- MenuRenderer.cs
- DrawItemEvent.cs
- SurrogateSelector.cs
- EdgeModeValidation.cs
- MarkupExtensionSerializer.cs
- RsaKeyIdentifierClause.cs
- ConfigurationManagerHelperFactory.cs
- InputProcessorProfiles.cs
- XmlSchemaObject.cs
- ColorTranslator.cs
- XmlElementAttribute.cs
- BaseResourcesBuildProvider.cs
- ListViewDataItem.cs
- Messages.cs
- Pair.cs
- VectorAnimation.cs
- SendingRequestEventArgs.cs
- DictionaryEntry.cs
- DispatcherTimer.cs
- LogLogRecordEnumerator.cs
- BrushMappingModeValidation.cs
- ProfilePropertySettingsCollection.cs
- PtsPage.cs
- LocalFileSettingsProvider.cs
- NetSectionGroup.cs
- documentation.cs
- WorkflowServiceAttributes.cs
- Point3DIndependentAnimationStorage.cs
- StreamHelper.cs
- Base64Stream.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- CalendarDay.cs
- ResolvedKeyFrameEntry.cs
- PreviewPageInfo.cs
- ExpressionConverter.cs
- CollectionChangeEventArgs.cs
- TextContainerChangedEventArgs.cs
- WebPartCatalogAddVerb.cs
- ComboBoxRenderer.cs
- _TransmitFileOverlappedAsyncResult.cs
- SmiSettersStream.cs
- StringUtil.cs
- TemplateControlBuildProvider.cs
- Label.cs
- Compress.cs
- ResourceManager.cs
- HeaderFilter.cs
- QueryConverter.cs
- MailHeaderInfo.cs
- MediaCommands.cs
- ReaderContextStackData.cs
- FigureParaClient.cs
- HandlerFactoryWrapper.cs
- AssemblyHelper.cs
- Pointer.cs
- GeometryDrawing.cs
- OSFeature.cs
- CompressStream.cs
- XMLSyntaxException.cs
- DataTableTypeConverter.cs
- ComPlusDiagnosticTraceSchemas.cs
- ObjectAnimationUsingKeyFrames.cs
- BindingUtils.cs
- AlignmentYValidation.cs