Code:
/ 4.0 / 4.0 / 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. //------------------------------------------------------------------------ // // 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
- ButtonChrome.cs
- TextContainer.cs
- DiscoveryProxy.cs
- FusionWrap.cs
- WebZone.cs
- PnrpPeerResolver.cs
- EmptyTextWriter.cs
- ManifestResourceInfo.cs
- RewritingProcessor.cs
- XmlWrappingReader.cs
- DataTableMapping.cs
- RectangleGeometry.cs
- WebPartsPersonalization.cs
- _HelperAsyncResults.cs
- DomNameTable.cs
- EdmProperty.cs
- SafeEventHandle.cs
- CreateInstanceBinder.cs
- Converter.cs
- MessageQueueTransaction.cs
- WebPartConnectionsCancelVerb.cs
- XmlSchemaAnnotated.cs
- DataGridCaption.cs
- OleDragDropHandler.cs
- TypeBuilder.cs
- FastPropertyAccessor.cs
- ColorConverter.cs
- ElementNotEnabledException.cs
- EDesignUtil.cs
- PrinterUnitConvert.cs
- ObjectStateEntry.cs
- TransactionValidationBehavior.cs
- selecteditemcollection.cs
- PagePropertiesChangingEventArgs.cs
- TextComposition.cs
- ZipIOExtraFieldElement.cs
- MetadataUtil.cs
- WebCategoryAttribute.cs
- Mapping.cs
- datacache.cs
- ToolboxItemLoader.cs
- XsltSettings.cs
- QuestionEventArgs.cs
- ExceptionUtil.cs
- ValueProviderWrapper.cs
- BasePattern.cs
- ConfigurationManager.cs
- QilUnary.cs
- ClientType.cs
- SimpleNameService.cs
- MachineSettingsSection.cs
- OracleInternalConnection.cs
- ByteViewer.cs
- DownloadProgressEventArgs.cs
- DataMisalignedException.cs
- SystemIcmpV4Statistics.cs
- ConditionCollection.cs
- LingerOption.cs
- WrapPanel.cs
- SmtpMail.cs
- FontConverter.cs
- ConnectionManagementSection.cs
- StrongNameKeyPair.cs
- RuntimeCompatibilityAttribute.cs
- CalendarItem.cs
- SystemDropShadowChrome.cs
- UiaCoreProviderApi.cs
- CodeDesigner.cs
- TakeOrSkipQueryOperator.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- Rotation3DAnimationBase.cs
- TextPatternIdentifiers.cs
- PropertiesTab.cs
- VirtualPathUtility.cs
- EventRecord.cs
- DynamicValidator.cs
- BitmapEffectInput.cs
- StylusTouchDevice.cs
- ScriptReferenceEventArgs.cs
- ModelPerspective.cs
- SelectionUIService.cs
- WebPartMenuStyle.cs
- Animatable.cs
- TextWriterEngine.cs
- FilteredDataSetHelper.cs
- VariantWrapper.cs
- SessionStateSection.cs
- NavigationProgressEventArgs.cs
- ColumnPropertiesGroup.cs
- MobileErrorInfo.cs
- TableLayoutStyle.cs
- XmlSchemaAnnotated.cs
- ExtendedProperty.cs
- HtmlGenericControl.cs
- XsltInput.cs
- WebConfigurationHostFileChange.cs
- CFGGrammar.cs
- MimeObjectFactory.cs
- NameValuePair.cs
- NameValuePermission.cs