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
- Int16AnimationBase.cs
- DocumentCollection.cs
- TemplateContainer.cs
- TimeSpanMinutesConverter.cs
- ToolStripScrollButton.cs
- ConfigurationStrings.cs
- ApplicationDirectoryMembershipCondition.cs
- FixedSOMLineCollection.cs
- RenderOptions.cs
- InputScopeManager.cs
- HttpResponseInternalBase.cs
- RelationshipEndCollection.cs
- GetPageCompletedEventArgs.cs
- FrameworkElement.cs
- ExtensionDataObject.cs
- CalendarAutomationPeer.cs
- TableLayoutStyleCollection.cs
- DrawingCollection.cs
- IResourceProvider.cs
- JsonCollectionDataContract.cs
- TreeWalker.cs
- AutoResizedEvent.cs
- WindowsListViewGroupHelper.cs
- ZeroOpNode.cs
- PostBackTrigger.cs
- SessionEndedEventArgs.cs
- PenThreadPool.cs
- TemplateColumn.cs
- DiscreteKeyFrames.cs
- TextTabProperties.cs
- ImagingCache.cs
- WebOperationContext.cs
- Ray3DHitTestResult.cs
- ListViewDeletedEventArgs.cs
- Permission.cs
- CodeNamespace.cs
- TimerEventSubscription.cs
- ReaderOutput.cs
- EntityTypeEmitter.cs
- Color.cs
- ServiceObjectContainer.cs
- SystemBrushes.cs
- ReadOnlyHierarchicalDataSourceView.cs
- ClientTarget.cs
- DeflateStream.cs
- Crypto.cs
- ServiceEndpointAssociationProvider.cs
- RewritingProcessor.cs
- MergePropertyDescriptor.cs
- StoragePropertyMapping.cs
- XamlToRtfParser.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- TreeNodeCollectionEditor.cs
- DescendantBaseQuery.cs
- AssemblyCacheEntry.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- StandardBindingElement.cs
- SqlNodeAnnotation.cs
- Timer.cs
- NativeCppClassAttribute.cs
- AssemblyFilter.cs
- XmlAttributes.cs
- PageParserFilter.cs
- DynamicDiscoSearcher.cs
- XmlRawWriter.cs
- DynamicField.cs
- SocketPermission.cs
- HttpDateParse.cs
- ComplexTypeEmitter.cs
- RuntimeHelpers.cs
- SoapAttributes.cs
- TypeDependencyAttribute.cs
- DependsOnAttribute.cs
- BoundPropertyEntry.cs
- DataGridViewColumnHeaderCell.cs
- PageRanges.cs
- WebBaseEventKeyComparer.cs
- RootDesignerSerializerAttribute.cs
- SoapReflectionImporter.cs
- DirtyTextRange.cs
- SpecialNameAttribute.cs
- SectionInput.cs
- ConstrainedDataObject.cs
- InvokerUtil.cs
- ComponentRenameEvent.cs
- WebPartConnectionsCancelEventArgs.cs
- ByteStreamMessageUtility.cs
- ReadOnlyDictionary.cs
- CodeDomDecompiler.cs
- WeakReadOnlyCollection.cs
- TreeNodeBindingCollection.cs
- X509Certificate2.cs
- OutputWindow.cs
- ResourcePermissionBaseEntry.cs
- FixedDocumentPaginator.cs
- FileChangesMonitor.cs
- StructuralComparisons.cs
- UnsafeNativeMethods.cs
- PrimitiveDataContract.cs
- BitmapDecoder.cs