Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / textformatting / TextSimpleMarkerProperties.cs / 1305600 / 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 ) { if (textParagraphProperties == null) throw new ArgumentNullException("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
- EntityDataSourceDataSelection.cs
- OracleRowUpdatedEventArgs.cs
- StringStorage.cs
- DynamicPropertyReader.cs
- LayoutSettings.cs
- LinearKeyFrames.cs
- DataControlField.cs
- SmiEventSink_Default.cs
- QuaternionKeyFrameCollection.cs
- LambdaCompiler.Logical.cs
- Rules.cs
- DataPagerField.cs
- ImageCodecInfo.cs
- SvcMapFile.cs
- DataTableExtensions.cs
- ExecutionContext.cs
- EntityDescriptor.cs
- XmlElementAttributes.cs
- XmlLoader.cs
- StatusBarPanel.cs
- Stack.cs
- BamlLocalizableResource.cs
- SortExpressionBuilder.cs
- OleDbSchemaGuid.cs
- BlurBitmapEffect.cs
- DataSourceControlBuilder.cs
- CapiSafeHandles.cs
- SafeRightsManagementHandle.cs
- ScaleTransform.cs
- HierarchicalDataBoundControl.cs
- ExpandSegmentCollection.cs
- XsltQilFactory.cs
- CellParagraph.cs
- MultiBindingExpression.cs
- HttpVersion.cs
- GiveFeedbackEventArgs.cs
- Expander.cs
- SignerInfo.cs
- DocumentEventArgs.cs
- LinearGradientBrush.cs
- ConstructorExpr.cs
- EditingCoordinator.cs
- DelegatingConfigHost.cs
- ListCollectionView.cs
- XpsS0ValidatingLoader.cs
- RootNamespaceAttribute.cs
- BackgroundWorker.cs
- SoundPlayer.cs
- XmlILOptimizerVisitor.cs
- PriorityBinding.cs
- XmlDocument.cs
- HttpResponse.cs
- ProtectedConfigurationProviderCollection.cs
- CalendarDesigner.cs
- OutputCacheProviderCollection.cs
- HitTestFilterBehavior.cs
- AppSettingsSection.cs
- TaiwanLunisolarCalendar.cs
- PropertyChangeTracker.cs
- MD5.cs
- StringExpressionSet.cs
- PropertyEmitter.cs
- ReachPageContentCollectionSerializer.cs
- HMACMD5.cs
- StaticTextPointer.cs
- MenuDesigner.cs
- CfgParser.cs
- CryptoConfig.cs
- TypefaceMap.cs
- SecurityHelper.cs
- TextClipboardData.cs
- PlatformNotSupportedException.cs
- Authorization.cs
- DataGridCellsPanel.cs
- CodeValidator.cs
- X509UI.cs
- TableCellAutomationPeer.cs
- ObjectDataSourceView.cs
- DataRelation.cs
- ConfigXmlComment.cs
- _AutoWebProxyScriptHelper.cs
- TextSelectionHelper.cs
- SimpleWorkerRequest.cs
- COAUTHIDENTITY.cs
- ReplyChannelBinder.cs
- DockProviderWrapper.cs
- ColorTransform.cs
- DesignerSerializerAttribute.cs
- WebWorkflowRole.cs
- SqlNodeAnnotation.cs
- WebPartTracker.cs
- DataGridViewSelectedCellCollection.cs
- DataGridViewCellStyleEditor.cs
- ExternalDataExchangeClient.cs
- QueryOutputWriter.cs
- OdbcDataReader.cs
- BufferModeSettings.cs
- ReaderOutput.cs
- TextSelectionProcessor.cs
- SchemaTableOptionalColumn.cs