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
- DefaultPrintController.cs
- WebAdminConfigurationHelper.cs
- PipeSecurity.cs
- Internal.cs
- WebPartUtil.cs
- XmlWriter.cs
- DropShadowEffect.cs
- SqlCacheDependencyDatabase.cs
- ParameterToken.cs
- ExtendedPropertyDescriptor.cs
- ILGen.cs
- Typeface.cs
- XhtmlBasicLiteralTextAdapter.cs
- AspCompat.cs
- ThousandthOfEmRealPoints.cs
- InstancePersistenceException.cs
- QueryContinueDragEventArgs.cs
- XhtmlCssHandler.cs
- InputQueueChannel.cs
- brushes.cs
- StandardCommandToolStripMenuItem.cs
- VerificationAttribute.cs
- TextDecorationCollection.cs
- SigningCredentials.cs
- TextServicesContext.cs
- ScriptingScriptResourceHandlerSection.cs
- ScaleTransform.cs
- SafeLibraryHandle.cs
- FunctionQuery.cs
- VsPropertyGrid.cs
- UnmanagedBitmapWrapper.cs
- ThreadWorkerController.cs
- userdatakeys.cs
- MessagePropertyVariants.cs
- bidPrivateBase.cs
- ObjectDataSourceStatusEventArgs.cs
- ReadOnlyTernaryTree.cs
- Bitmap.cs
- RequestNavigateEventArgs.cs
- TraceData.cs
- BoolExpressionVisitors.cs
- DataTablePropertyDescriptor.cs
- VisualBasicValue.cs
- XmlAttribute.cs
- SurrogateDataContract.cs
- WmlValidatorAdapter.cs
- SystemDropShadowChrome.cs
- XmlComment.cs
- SafeRightsManagementHandle.cs
- ChameleonKey.cs
- PassportAuthenticationModule.cs
- SqlCacheDependency.cs
- DBAsyncResult.cs
- UnionCqlBlock.cs
- hwndwrapper.cs
- activationcontext.cs
- SHA512Managed.cs
- ExtendedTransformFactory.cs
- TypedElement.cs
- MsmqElementBase.cs
- DataGridTextColumn.cs
- StructuralType.cs
- HwndKeyboardInputProvider.cs
- PopOutPanel.cs
- InvokeBinder.cs
- WebPartAddingEventArgs.cs
- Margins.cs
- HtmlAnchor.cs
- HeaderedContentControl.cs
- CharAnimationUsingKeyFrames.cs
- TreeViewImageIndexConverter.cs
- ColumnResult.cs
- X509CertificateCollection.cs
- AssemblyInfo.cs
- MetafileHeader.cs
- AvTrace.cs
- coordinatorfactory.cs
- FormatVersion.cs
- MsmqActivation.cs
- TokenBasedSet.cs
- ServiceOperationParameter.cs
- XamlPointCollectionSerializer.cs
- TraceHwndHost.cs
- WorkflowMarkupSerializerMapping.cs
- FunctionOverloadResolver.cs
- PreProcessInputEventArgs.cs
- HScrollBar.cs
- ProxyHelper.cs
- ContainerParagraph.cs
- ClientSettingsSection.cs
- VirtualPathUtility.cs
- ModelItem.cs
- DataGrid.cs
- BmpBitmapDecoder.cs
- RequestQueue.cs
- DesignerActionVerbList.cs
- DataGridViewCellCancelEventArgs.cs
- CheckBox.cs
- TransformGroup.cs
- XmlAttributeCache.cs