Code:
/ 4.0 / 4.0 / 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. //------------------------------------------------------------------------ // // 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
- NetworkInformationException.cs
- KnownAssembliesSet.cs
- TreeViewEvent.cs
- Renderer.cs
- TypeLoader.cs
- PermissionSetTriple.cs
- AlternationConverter.cs
- DropTarget.cs
- DifferencingCollection.cs
- StyleCollectionEditor.cs
- PenThreadPool.cs
- XmlLoader.cs
- LoginUtil.cs
- LifetimeServices.cs
- SoapWriter.cs
- SchemaNotation.cs
- XPathNodeIterator.cs
- Matrix.cs
- Size3D.cs
- SecurityUtils.cs
- DataGridViewCellStyleConverter.cs
- PropertyGridCommands.cs
- TextChangedEventArgs.cs
- DataObjectFieldAttribute.cs
- HandoffBehavior.cs
- StringResourceManager.cs
- XmlTextReader.cs
- Helper.cs
- HttpDebugHandler.cs
- EncryptedReference.cs
- FormParameter.cs
- DecimalFormatter.cs
- ProtocolsSection.cs
- SrgsElementList.cs
- FormViewInsertedEventArgs.cs
- LingerOption.cs
- BuiltInPermissionSets.cs
- DefaultAssemblyResolver.cs
- XmlAutoDetectWriter.cs
- ConfigurationManager.cs
- MetadataWorkspace.cs
- XmlSchemaInfo.cs
- ToolStripLabel.cs
- MetadataPropertyvalue.cs
- PresentationTraceSources.cs
- WebMessageEncodingBindingElement.cs
- UInt32Converter.cs
- xamlnodes.cs
- DataBoundLiteralControl.cs
- EntitySetBaseCollection.cs
- TableLayoutRowStyleCollection.cs
- Memoizer.cs
- XmlStreamedByteStreamReader.cs
- GorillaCodec.cs
- UIElementCollection.cs
- QueuePropertyVariants.cs
- querybuilder.cs
- Graph.cs
- PropertyGridCommands.cs
- AggregatePushdown.cs
- CompiledRegexRunnerFactory.cs
- RegistryPermission.cs
- DeviceOverridableAttribute.cs
- SaveFileDialog.cs
- InstancePersistenceCommandException.cs
- X509Extension.cs
- BaseTemplateBuildProvider.cs
- FilterRepeater.cs
- RecipientInfo.cs
- PropertyCondition.cs
- StyleXamlParser.cs
- CacheSection.cs
- BaseTemplateCodeDomTreeGenerator.cs
- SqlStream.cs
- MSAANativeProvider.cs
- PerformanceCounterPermissionAttribute.cs
- ScriptReferenceEventArgs.cs
- ExtensionQuery.cs
- Ray3DHitTestResult.cs
- QuaternionAnimationUsingKeyFrames.cs
- ComboBoxItem.cs
- ContentType.cs
- FontCacheUtil.cs
- XPathAncestorQuery.cs
- TrackingServices.cs
- CharAnimationUsingKeyFrames.cs
- AttachedPropertyBrowsableAttribute.cs
- WebConfigurationHost.cs
- ConnectionOrientedTransportChannelFactory.cs
- LinearGradientBrush.cs
- JoinCqlBlock.cs
- DataGridState.cs
- InvalidDataException.cs
- CodeTypeConstructor.cs
- VisualCollection.cs
- HelloMessageApril2005.cs
- TransactionValidationBehavior.cs
- DocumentScope.cs
- DynamicRendererThreadManager.cs
- GridViewItemAutomationPeer.cs