Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / 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: [....]/sites/Avalon/Specs/Text%20Formatting%20API.doc // // Created: 1-2-2004 [....] ([....]) // //----------------------------------------------------------------------- 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
- OperationResponse.cs
- BaseValidator.cs
- FixedHyperLink.cs
- SuspendDesigner.cs
- hresults.cs
- SqlException.cs
- _ShellExpression.cs
- SerializationFieldInfo.cs
- LayoutEvent.cs
- SystemResources.cs
- RuleElement.cs
- Fonts.cs
- DictionarySectionHandler.cs
- ObjectManager.cs
- PostBackOptions.cs
- PerfProviderCollection.cs
- MetafileHeader.cs
- TextDecorationCollectionConverter.cs
- PropertyStore.cs
- ManipulationLogic.cs
- MultitargetingHelpers.cs
- ObjectSelectorEditor.cs
- HtmlTableCell.cs
- ByteStorage.cs
- SystemWebCachingSectionGroup.cs
- CallbackException.cs
- CellTreeSimplifier.cs
- StorageMappingFragment.cs
- Authorization.cs
- LinkUtilities.cs
- NotifyInputEventArgs.cs
- ImageFormatConverter.cs
- SmiEventStream.cs
- NameValueConfigurationCollection.cs
- ZipIOLocalFileBlock.cs
- ClientTarget.cs
- ParameterDataSourceExpression.cs
- ListSurrogate.cs
- ScriptResourceDefinition.cs
- RuleDefinitions.cs
- ToolboxComponentsCreatingEventArgs.cs
- NetworkAddressChange.cs
- COM2FontConverter.cs
- URLString.cs
- TableRow.cs
- XpsS0ValidatingLoader.cs
- DateTimeAutomationPeer.cs
- Serializer.cs
- HuffModule.cs
- IUnknownConstantAttribute.cs
- SerialErrors.cs
- SequenceDesigner.cs
- DataErrorValidationRule.cs
- FormViewUpdatedEventArgs.cs
- Visual.cs
- ObjectReaderCompiler.cs
- RowUpdatingEventArgs.cs
- TextAnchor.cs
- ControlDesigner.cs
- ColumnHeaderConverter.cs
- InheritablePropertyChangeInfo.cs
- NGCSerializerAsync.cs
- RuleSet.cs
- BooleanProjectedSlot.cs
- FileLevelControlBuilderAttribute.cs
- ConfigsHelper.cs
- SerialPinChanges.cs
- DataGridTablesFactory.cs
- Walker.cs
- KeySplineConverter.cs
- DateTimeOffset.cs
- ClaimTypeElement.cs
- EmptyQuery.cs
- CoTaskMemSafeHandle.cs
- DataServiceRequestArgs.cs
- PlanCompilerUtil.cs
- Timeline.cs
- PermissionRequestEvidence.cs
- DataListCommandEventArgs.cs
- ApplicationServiceHelper.cs
- Parser.cs
- AsnEncodedData.cs
- PromptBuilder.cs
- OleDbCommand.cs
- NullableIntSumAggregationOperator.cs
- QueueAccessMode.cs
- Timer.cs
- GACMembershipCondition.cs
- PerformanceCounterPermissionAttribute.cs
- ImageListImageEditor.cs
- TextBlock.cs
- KeySplineConverter.cs
- CaseStatement.cs
- UserPrincipalNameElement.cs
- OutputScope.cs
- SpeechEvent.cs
- DrawingAttributesDefaultValueFactory.cs
- FlowPosition.cs
- XmlDataFileEditor.cs
- Monitor.cs