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
- WebServiceFaultDesigner.cs
- ScrollData.cs
- StylusButtonEventArgs.cs
- UnsafeNativeMethods.cs
- EventQueueState.cs
- DiscoveryClientChannelFactory.cs
- PrivateFontCollection.cs
- SettingsProperty.cs
- QueryCreatedEventArgs.cs
- RedistVersionInfo.cs
- PrivateFontCollection.cs
- DesignerActionUI.cs
- Vector3dCollection.cs
- WebConvert.cs
- HttpCachePolicy.cs
- IDictionary.cs
- PopupEventArgs.cs
- Attribute.cs
- GlyphRun.cs
- TTSEngineTypes.cs
- PersistChildrenAttribute.cs
- BitmapMetadataBlob.cs
- XslAst.cs
- MetafileHeaderEmf.cs
- dsa.cs
- basevalidator.cs
- LinqDataSourceHelper.cs
- StyleModeStack.cs
- SqlDataSourceEnumerator.cs
- TableRow.cs
- WorkflowQueuingService.cs
- ProfilePropertyNameValidator.cs
- XXXInfos.cs
- BooleanAnimationUsingKeyFrames.cs
- GcHandle.cs
- ArgumentNullException.cs
- AppDomainProtocolHandler.cs
- ParamArrayAttribute.cs
- LiteralControl.cs
- COM2ExtendedUITypeEditor.cs
- SmiContext.cs
- ColumnMapCopier.cs
- _DomainName.cs
- SystemIPv6InterfaceProperties.cs
- TextLineResult.cs
- SchemaConstraints.cs
- ObjectSecurityT.cs
- PerspectiveCamera.cs
- PeerNameRegistration.cs
- FlowDocumentReader.cs
- EditCommandColumn.cs
- DataGridViewSelectedColumnCollection.cs
- ServiceCredentials.cs
- DistributedTransactionPermission.cs
- SmtpCommands.cs
- NullReferenceException.cs
- RecordManager.cs
- bidPrivateBase.cs
- Normalizer.cs
- PropertyPathConverter.cs
- FrameSecurityDescriptor.cs
- CodeTypeReferenceExpression.cs
- DocumentPageView.cs
- MetabaseServerConfig.cs
- ProgressBarBrushConverter.cs
- FileChangesMonitor.cs
- BufferedGenericXmlSecurityToken.cs
- FormsAuthenticationUser.cs
- OleDbWrapper.cs
- FieldAccessException.cs
- AnchoredBlock.cs
- DataViewListener.cs
- XmlSignatureManifest.cs
- DataSourceXmlSerializationAttribute.cs
- ControlTemplate.cs
- ApplicationBuildProvider.cs
- ParameterToken.cs
- MsmqIntegrationInputChannel.cs
- SizeF.cs
- IndexedEnumerable.cs
- _ListenerAsyncResult.cs
- DefaultClaimSet.cs
- FixedNode.cs
- SqlTypeSystemProvider.cs
- GlyphRun.cs
- HierarchicalDataBoundControl.cs
- HtmlElementEventArgs.cs
- PropertyEmitterBase.cs
- MetadataItemCollectionFactory.cs
- LocalizableAttribute.cs
- PropVariant.cs
- FunctionParameter.cs
- HttpListenerTimeoutManager.cs
- PasswordTextNavigator.cs
- SemaphoreFullException.cs
- HashUtility.cs
- HitTestResult.cs
- PackageProperties.cs
- AssemblyAssociatedContentFileAttribute.cs
- CacheHelper.cs