Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- BitmapEffectState.cs
- XamlContextStack.cs
- DataGridTablesFactory.cs
- OutOfProcStateClientManager.cs
- SqlUserDefinedAggregateAttribute.cs
- SqlBooleanizer.cs
- CTreeGenerator.cs
- DigitShape.cs
- Visual.cs
- ToolConsole.cs
- GridViewCommandEventArgs.cs
- FileUtil.cs
- ComponentCommands.cs
- ValidatorCompatibilityHelper.cs
- IntSecurity.cs
- MailHeaderInfo.cs
- HandlerBase.cs
- WebPartMinimizeVerb.cs
- LeftCellWrapper.cs
- LicenseManager.cs
- TraceSection.cs
- SchemaObjectWriter.cs
- XmlSchemaSimpleContentExtension.cs
- DependencyObjectProvider.cs
- DiffuseMaterial.cs
- GraphicsPathIterator.cs
- StdValidatorsAndConverters.cs
- dtdvalidator.cs
- DetailsViewModeEventArgs.cs
- ItemCollection.cs
- LocatorPart.cs
- ListViewItemMouseHoverEvent.cs
- GridItemProviderWrapper.cs
- CodeMethodMap.cs
- IdnMapping.cs
- ToolboxBitmapAttribute.cs
- SafeProcessHandle.cs
- DataGridBoolColumn.cs
- HashAlgorithm.cs
- Zone.cs
- TextDocumentView.cs
- XPathDocumentBuilder.cs
- MenuItemStyleCollection.cs
- ConfigurationManagerHelper.cs
- XamlTypeMapperSchemaContext.cs
- PngBitmapEncoder.cs
- FontConverter.cs
- UnknownBitmapDecoder.cs
- TemplatedAdorner.cs
- HostedImpersonationContext.cs
- OrderedDictionaryStateHelper.cs
- VisualTransition.cs
- SmtpMail.cs
- ResourceProviderFactory.cs
- DebugView.cs
- CompilerTypeWithParams.cs
- FontStretches.cs
- DelegatedStream.cs
- GroupBoxRenderer.cs
- EntityDataSourceSelectedEventArgs.cs
- ResourceManager.cs
- SystemIPInterfaceStatistics.cs
- SafeNativeMethodsCLR.cs
- FontEmbeddingManager.cs
- TextFragmentEngine.cs
- DatatypeImplementation.cs
- SafeReversePInvokeHandle.cs
- CustomAttributeFormatException.cs
- FileLoadException.cs
- InternalMappingException.cs
- FileRecordSequenceCompletedAsyncResult.cs
- IListConverters.cs
- List.cs
- DecimalSumAggregationOperator.cs
- StorageEntityContainerMapping.cs
- ReadOnlyTernaryTree.cs
- HMACSHA512.cs
- StringInfo.cs
- _CommandStream.cs
- PreviewPrintController.cs
- IBuiltInEvidence.cs
- DocumentPage.cs
- ListView.cs
- HttpsHostedTransportConfiguration.cs
- C14NUtil.cs
- ToggleProviderWrapper.cs
- EventLogTraceListener.cs
- XsltLibrary.cs
- PropertiesTab.cs
- WindowsPrincipal.cs
- DesignerHelpers.cs
- DataMemberListEditor.cs
- NotCondition.cs
- TrackingRecord.cs
- ExpanderAutomationPeer.cs
- RuntimeCompatibilityAttribute.cs
- OleDbMetaDataFactory.cs
- ISAPIRuntime.cs
- _StreamFramer.cs
- GB18030Encoding.cs