Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / Media / textformatting / TextEndOfLine.cs / 1 / TextEndOfLine.cs
//------------------------------------------------------------------------ // // Microsoft Windows Client Platform // Copyright (C) Microsoft Corporation // // File: TextEndOfLine.cs // // Contents: Implementation of text linebreak control // // 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; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.TextFormatting { ////// Specialized text run used to mark the end of a line /// public class TextEndOfLine : TextRun { private int _length; private TextRunProperties _textRunProperties; #region Constructors ////// Construct a linebreak run /// /// number of characters public TextEndOfLine(int length) : this(length, null) {} ////// Construct a linebreak run /// /// number of characters /// linebreak text run properties public TextEndOfLine( int length, TextRunProperties textRunProperties ) { if (length <= 0) throw new ArgumentOutOfRangeException("length", SR.Get(SRID.ParameterMustBeGreaterThanZero)); if (textRunProperties != null && textRunProperties.Typeface == null) throw new ArgumentNullException("textRunProperties.Typeface"); _length = length; _textRunProperties = textRunProperties; } #endregion ////// Reference to character buffer /// public sealed override CharacterBufferReference CharacterBufferReference { get { return new CharacterBufferReference(); } } ////// Character length /// public sealed override int Length { get { return _length; } } ////// A set of properties shared by every characters in the run /// public sealed override TextRunProperties Properties { get { return _textRunProperties; } } } } // 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 // // File: TextEndOfLine.cs // // Contents: Implementation of text linebreak control // // 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; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.TextFormatting { ////// Specialized text run used to mark the end of a line /// public class TextEndOfLine : TextRun { private int _length; private TextRunProperties _textRunProperties; #region Constructors ////// Construct a linebreak run /// /// number of characters public TextEndOfLine(int length) : this(length, null) {} ////// Construct a linebreak run /// /// number of characters /// linebreak text run properties public TextEndOfLine( int length, TextRunProperties textRunProperties ) { if (length <= 0) throw new ArgumentOutOfRangeException("length", SR.Get(SRID.ParameterMustBeGreaterThanZero)); if (textRunProperties != null && textRunProperties.Typeface == null) throw new ArgumentNullException("textRunProperties.Typeface"); _length = length; _textRunProperties = textRunProperties; } #endregion ////// Reference to character buffer /// public sealed override CharacterBufferReference CharacterBufferReference { get { return new CharacterBufferReference(); } } ////// Character length /// public sealed override int Length { get { return _length; } } ////// A set of properties shared by every characters in the run /// public sealed override TextRunProperties Properties { get { return _textRunProperties; } } } } // 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
- _CacheStreams.cs
- SamlAuthorizationDecisionClaimResource.cs
- MemberMaps.cs
- SynchronizedInputAdaptor.cs
- ListMarkerSourceInfo.cs
- DetailsViewModeEventArgs.cs
- DbDataRecord.cs
- cookiecontainer.cs
- BackgroundWorker.cs
- CodeArrayCreateExpression.cs
- Delegate.cs
- RemoteWebConfigurationHostServer.cs
- SpanIndex.cs
- DocumentAutomationPeer.cs
- TextWriter.cs
- WebConvert.cs
- XmlSortKeyAccumulator.cs
- SerialPort.cs
- DataServiceExpressionVisitor.cs
- UndoManager.cs
- SetterTriggerConditionValueConverter.cs
- StatusBarPanel.cs
- RangeBaseAutomationPeer.cs
- ConnectionPointCookie.cs
- ReadOnlyCollectionBase.cs
- FontDriver.cs
- SafeIUnknown.cs
- DeviceContext2.cs
- Timer.cs
- CodeMemberMethod.cs
- SaveFileDialog.cs
- Sql8ConformanceChecker.cs
- oledbmetadatacolumnnames.cs
- Animatable.cs
- BindStream.cs
- CacheEntry.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- AppSettingsExpressionBuilder.cs
- DataView.cs
- MessageEncodingBindingElement.cs
- DetailsViewInsertEventArgs.cs
- ParentUndoUnit.cs
- PropertyMapper.cs
- HighContrastHelper.cs
- BulletedListEventArgs.cs
- LinkedResourceCollection.cs
- PropertyGridView.cs
- SmiTypedGetterSetter.cs
- GlyphManager.cs
- MruCache.cs
- WsdlInspector.cs
- Win32Exception.cs
- SimpleWebHandlerParser.cs
- CatalogZoneBase.cs
- MenuItemStyle.cs
- BitmapEffectInput.cs
- RequestBringIntoViewEventArgs.cs
- _NegoStream.cs
- GuidelineSet.cs
- OracleParameter.cs
- ListDataBindEventArgs.cs
- DrawTreeNodeEventArgs.cs
- UseLicense.cs
- FileDialogCustomPlacesCollection.cs
- UnmanagedMarshal.cs
- NavigationProperty.cs
- PasswordBox.cs
- TemplatePropertyEntry.cs
- DatagridviewDisplayedBandsData.cs
- NumberSubstitution.cs
- _NetworkingPerfCounters.cs
- DataFieldConverter.cs
- IndentTextWriter.cs
- SecurityHelper.cs
- DataGridRelationshipRow.cs
- HttpTransportBindingElement.cs
- TargetParameterCountException.cs
- Point3D.cs
- PointCollection.cs
- SpoolingTask.cs
- HttpListenerException.cs
- EntityCommand.cs
- Vector3DValueSerializer.cs
- WsdlInspector.cs
- NamespaceList.cs
- WorkflowTraceTransfer.cs
- TextEditorMouse.cs
- DesignerDataColumn.cs
- Int32Collection.cs
- XmlBinaryWriterSession.cs
- CollectionViewGroupRoot.cs
- SpeakCompletedEventArgs.cs
- LineUtil.cs
- XamlPointCollectionSerializer.cs
- Vector3DAnimationBase.cs
- EncodingNLS.cs
- AppliedDeviceFiltersEditor.cs
- DataGridPagerStyle.cs
- TableLayoutColumnStyleCollection.cs
- DecoderNLS.cs