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
- AsmxEndpointPickerExtension.cs
- DataTemplate.cs
- GridViewAutomationPeer.cs
- MethodRental.cs
- PeerNodeAddress.cs
- DrawingBrush.cs
- EventHandlersStore.cs
- ColorBlend.cs
- WindowsSlider.cs
- RelatedCurrencyManager.cs
- PolicyVersionConverter.cs
- AssemblyHash.cs
- DbProviderSpecificTypePropertyAttribute.cs
- ConfigsHelper.cs
- ConfigPathUtility.cs
- PrtCap_Public_Simple.cs
- CollectionContainer.cs
- MemberDomainMap.cs
- XmlElementAttributes.cs
- MimeTypeMapper.cs
- IssuerInformation.cs
- ViewPort3D.cs
- DependencyPropertyAttribute.cs
- UInt32Converter.cs
- SqlDataSourceConnectionPanel.cs
- CompiledQueryCacheKey.cs
- ClrProviderManifest.cs
- WsdlBuildProvider.cs
- brushes.cs
- WebServicesSection.cs
- ToolTipService.cs
- InputBinding.cs
- CqlBlock.cs
- DesignTableCollection.cs
- WebPartCollection.cs
- DesignerDataView.cs
- HashCodeCombiner.cs
- ArraySortHelper.cs
- RenderCapability.cs
- WS2007HttpBindingElement.cs
- EncoderParameters.cs
- OutputCacheSettingsSection.cs
- ConfigurationElementProperty.cs
- ResourcePool.cs
- ParameterInfo.cs
- TdsRecordBufferSetter.cs
- XmlEntity.cs
- CheckBoxFlatAdapter.cs
- OperationContextScope.cs
- Timer.cs
- Keyboard.cs
- XmlAnyElementAttribute.cs
- DecimalAnimation.cs
- BehaviorEditorPart.cs
- Style.cs
- EntityContainer.cs
- BitVector32.cs
- XmlQualifiedNameTest.cs
- PropertyChangeTracker.cs
- PinnedBufferMemoryStream.cs
- TraceSource.cs
- ContainerActivationHelper.cs
- ActiveXHelper.cs
- NativeRightsManagementAPIsStructures.cs
- ExpressionServices.cs
- Paragraph.cs
- DataGridViewSelectedCellCollection.cs
- BindStream.cs
- EncryptedKey.cs
- HostedImpersonationContext.cs
- ReachIDocumentPaginatorSerializer.cs
- KeyValueConfigurationCollection.cs
- DataGridTextBox.cs
- _OSSOCK.cs
- XmlNamespaceManager.cs
- ServiceCredentialsElement.cs
- KeySplineConverter.cs
- TextTabProperties.cs
- InputReportEventArgs.cs
- TraceSection.cs
- webproxy.cs
- GeometryModel3D.cs
- SQLInt16.cs
- MsmqDiagnostics.cs
- RequestCache.cs
- ASCIIEncoding.cs
- VariantWrapper.cs
- PolicyUnit.cs
- DateTimeConverter.cs
- SqlStatistics.cs
- XamlTemplateSerializer.cs
- PropertyToken.cs
- _NetworkingPerfCounters.cs
- Splitter.cs
- HashMembershipCondition.cs
- ApplicationSecurityInfo.cs
- DesignOnlyAttribute.cs
- XmlReflectionMember.cs
- BooleanExpr.cs
- PriorityQueue.cs