Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- Span.cs
- DataGridViewColumn.cs
- MeshGeometry3D.cs
- ReadWriteSpinLock.cs
- SqlDependencyUtils.cs
- MailDefinitionBodyFileNameEditor.cs
- WebServiceClientProxyGenerator.cs
- UnaryOperationBinder.cs
- PtsPage.cs
- PropertyNames.cs
- ClientSession.cs
- EventLogWatcher.cs
- InsufficientMemoryException.cs
- ApplicationCommands.cs
- latinshape.cs
- InvalidPrinterException.cs
- ReadonlyMessageFilter.cs
- RecognitionResult.cs
- Translator.cs
- SmtpNegotiateAuthenticationModule.cs
- WindowsTitleBar.cs
- ThrowHelper.cs
- LayoutSettings.cs
- EnumType.cs
- ClientUrlResolverWrapper.cs
- NullableFloatMinMaxAggregationOperator.cs
- CopyOnWriteList.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- PrintPreviewDialog.cs
- ToolboxItemAttribute.cs
- Rfc2898DeriveBytes.cs
- ServiceRouteHandler.cs
- ServerProtocol.cs
- TableItemStyle.cs
- ResourceExpressionEditor.cs
- StylusOverProperty.cs
- FileDataSourceCache.cs
- MessageQueuePermissionAttribute.cs
- ColorTransformHelper.cs
- SchemaImporterExtensionElementCollection.cs
- ModelUIElement3D.cs
- SecurityPolicySection.cs
- ResourcesBuildProvider.cs
- DiagnosticsConfigurationHandler.cs
- SingleStorage.cs
- AutoGeneratedFieldProperties.cs
- LinqDataSourceDisposeEventArgs.cs
- DSASignatureDeformatter.cs
- PerformanceCounterPermission.cs
- WindowsListViewGroup.cs
- PageWrapper.cs
- ListViewCancelEventArgs.cs
- ObjectView.cs
- XmlExtensionFunction.cs
- MachinePropertyVariants.cs
- DiscreteKeyFrames.cs
- ScrollItemPattern.cs
- Vector3DIndependentAnimationStorage.cs
- SubqueryRules.cs
- XhtmlTextWriter.cs
- MatcherBuilder.cs
- _NativeSSPI.cs
- ImageDrawing.cs
- WebPartCatalogAddVerb.cs
- EtwTrackingParticipant.cs
- Queue.cs
- QueryExpression.cs
- ParagraphVisual.cs
- ArrayList.cs
- XomlSerializationHelpers.cs
- SecurityPolicySection.cs
- MessageQueuePermission.cs
- DataGridViewColumnDesignTimeVisibleAttribute.cs
- ListViewGroupItemCollection.cs
- MergePropertyDescriptor.cs
- _LoggingObject.cs
- DataSourceHelper.cs
- TreeWalkHelper.cs
- BookmarkEventArgs.cs
- InstanceContextMode.cs
- HtmlMeta.cs
- ComponentResourceKey.cs
- XPathNavigator.cs
- ContentHostHelper.cs
- SafeViewOfFileHandle.cs
- RSAOAEPKeyExchangeDeformatter.cs
- DependencyObjectType.cs
- SelectingProviderEventArgs.cs
- KeyValuePair.cs
- DataGridColumnCollection.cs
- PropertyValue.cs
- ConsumerConnectionPoint.cs
- RadioButtonRenderer.cs
- DataSourceControl.cs
- SHA384Managed.cs
- TemplateField.cs
- SqlDataSourceWizardForm.cs
- UnhandledExceptionEventArgs.cs
- WindowsTreeView.cs
- Transform3DGroup.cs