Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / Media / textformatting / TextSimpleMarkerProperties.cs / 1 / TextSimpleMarkerProperties.cs
//------------------------------------------------------------------------ // // Microsoft Windows Client Platform // Copyright (C) Microsoft Corporation, 2004 // // File: TextSimpleMarkerProperties.cs // // Contents: Generic implementation of text marker properties // // 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 MS.Internal.TextFormatting; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.TextFormatting { ////// Generic implementation of text marker properties /// public class TextSimpleMarkerProperties : TextMarkerProperties { private double _offset; private TextSource _textSource; ////// Construct a text marker object /// /// marker style /// distance from line start to the end of the marker symbol /// autonumbering counter of counter-style marker /// text paragraph properties public TextSimpleMarkerProperties( TextMarkerStyle style, double offset, int autoNumberingIndex, TextParagraphProperties textParagraphProperties ) { _offset = offset; if (style != TextMarkerStyle.None) { if (TextMarkerSource.IsKnownSymbolMarkerStyle(style)) { // autoNumberingIndex is ignored } else if (TextMarkerSource.IsKnownIndexMarkerStyle(style)) { // validate autoNumberingIndex if (autoNumberingIndex < 1) { throw new ArgumentOutOfRangeException("autoNumberingIndex", SR.Get(SRID.ParameterCannotBeLessThan, 1)); } } else { // invalid style throw new ArgumentException(SR.Get(SRID.Enum_Invalid, typeof(TextMarkerStyle)), "style"); } _textSource = new TextMarkerSource( textParagraphProperties, style, autoNumberingIndex ); } } ////// Distance from line start to the end of the marker symbol /// public sealed override double Offset { get { return _offset; } } ////// Source of text runs used for text marker /// public sealed override TextSource TextSource { get { return _textSource; } } } } // 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: TextSimpleMarkerProperties.cs // // Contents: Generic implementation of text marker properties // // 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 MS.Internal.TextFormatting; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.TextFormatting { ////// Generic implementation of text marker properties /// public class TextSimpleMarkerProperties : TextMarkerProperties { private double _offset; private TextSource _textSource; ////// Construct a text marker object /// /// marker style /// distance from line start to the end of the marker symbol /// autonumbering counter of counter-style marker /// text paragraph properties public TextSimpleMarkerProperties( TextMarkerStyle style, double offset, int autoNumberingIndex, TextParagraphProperties textParagraphProperties ) { _offset = offset; if (style != TextMarkerStyle.None) { if (TextMarkerSource.IsKnownSymbolMarkerStyle(style)) { // autoNumberingIndex is ignored } else if (TextMarkerSource.IsKnownIndexMarkerStyle(style)) { // validate autoNumberingIndex if (autoNumberingIndex < 1) { throw new ArgumentOutOfRangeException("autoNumberingIndex", SR.Get(SRID.ParameterCannotBeLessThan, 1)); } } else { // invalid style throw new ArgumentException(SR.Get(SRID.Enum_Invalid, typeof(TextMarkerStyle)), "style"); } _textSource = new TextMarkerSource( textParagraphProperties, style, autoNumberingIndex ); } } ////// Distance from line start to the end of the marker symbol /// public sealed override double Offset { get { return _offset; } } ////// Source of text runs used for text marker /// public sealed override TextSource TextSource { get { return _textSource; } } } } // 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
- DataGridViewSelectedCellCollection.cs
- DynamicDocumentPaginator.cs
- CompositeCollection.cs
- __Filters.cs
- FlagsAttribute.cs
- DataListDesigner.cs
- ValidatingPropertiesEventArgs.cs
- CatalogUtil.cs
- TransportConfigurationTypeElementCollection.cs
- BreakRecordTable.cs
- Zone.cs
- ModelTypeConverter.cs
- CapabilitiesRule.cs
- FormViewInsertedEventArgs.cs
- CalendarDayButton.cs
- CodeDirectionExpression.cs
- GetPageCompletedEventArgs.cs
- StorageComplexPropertyMapping.cs
- ProxyWebPartManager.cs
- ConfigXmlReader.cs
- SystemException.cs
- BitmapMetadataEnumerator.cs
- Style.cs
- PolyBezierSegmentFigureLogic.cs
- CfgParser.cs
- HScrollProperties.cs
- dataprotectionpermissionattribute.cs
- ExceptionUtil.cs
- ControlBuilderAttribute.cs
- Attributes.cs
- RandomDelaySendsAsyncResult.cs
- DataGridColumnHeaderCollection.cs
- MsmqIntegrationElement.cs
- ConnectionsZone.cs
- DecoderBestFitFallback.cs
- Vector3D.cs
- TextChange.cs
- TextRange.cs
- GetCertificateRequest.cs
- BitmapImage.cs
- StrokeNodeEnumerator.cs
- CommonObjectSecurity.cs
- OpCodes.cs
- PopupEventArgs.cs
- DurableEnlistmentState.cs
- DrawListViewColumnHeaderEventArgs.cs
- TransformerInfoCollection.cs
- CqlIdentifiers.cs
- IItemContainerGenerator.cs
- SqlPersistenceWorkflowInstanceDescription.cs
- LayoutInformation.cs
- DetailsViewUpdateEventArgs.cs
- IMembershipProvider.cs
- FormattedTextSymbols.cs
- DbQueryCommandTree.cs
- ColorConvertedBitmapExtension.cs
- KeyProperty.cs
- SQLSingle.cs
- BindingOperations.cs
- ImageButton.cs
- PackageStore.cs
- DocumentViewerConstants.cs
- Maps.cs
- SqlMetaData.cs
- PatternMatchRules.cs
- EnvironmentPermission.cs
- AuthenticationModeHelper.cs
- TagMapInfo.cs
- SqlNodeTypeOperators.cs
- CustomCredentialPolicy.cs
- SeverityFilter.cs
- DataGridViewMethods.cs
- SpeechRecognitionEngine.cs
- StyleSelector.cs
- WebPartZoneAutoFormat.cs
- X509CertificateChain.cs
- FileSystemEventArgs.cs
- RemotingSurrogateSelector.cs
- Viewport3DVisual.cs
- JsonReader.cs
- ChangePasswordDesigner.cs
- MenuItemBinding.cs
- __FastResourceComparer.cs
- OdbcParameterCollection.cs
- ApplicationServiceManager.cs
- Int32Rect.cs
- CharacterBuffer.cs
- TextStore.cs
- DetailsViewInsertEventArgs.cs
- RecommendedAsConfigurableAttribute.cs
- MaskedTextBoxTextEditor.cs
- DataControlFieldHeaderCell.cs
- TransformPatternIdentifiers.cs
- KnownBoxes.cs
- ProcessProtocolHandler.cs
- TextRange.cs
- RegexWorker.cs
- ZipIOExtraFieldZip64Element.cs
- RuntimeConfig.cs
- CounterCreationDataCollection.cs