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
- EntitySetBase.cs
- Unit.cs
- SystemFonts.cs
- ScrollBarAutomationPeer.cs
- SelectionService.cs
- SharedStream.cs
- SchemaNotation.cs
- JsonServiceDocumentSerializer.cs
- CapabilitiesRule.cs
- EndpointFilterProvider.cs
- TextWriter.cs
- ModelToObjectValueConverter.cs
- ColorMap.cs
- RectAnimationClockResource.cs
- BitSet.cs
- CodeTypeReference.cs
- RuntimeTransactionHandle.cs
- SynthesizerStateChangedEventArgs.cs
- ClientUIRequest.cs
- UnsafeNativeMethods.cs
- AppDomainProtocolHandler.cs
- Duration.cs
- EventLogPermissionEntry.cs
- ManipulationPivot.cs
- ConfigurationProviderException.cs
- XPathChildIterator.cs
- Faults.cs
- XamlWrapperReaders.cs
- MatrixTransform.cs
- VBIdentifierNameEditor.cs
- Simplifier.cs
- CardSpaceException.cs
- HttpListenerException.cs
- RsaSecurityTokenAuthenticator.cs
- ToolTipService.cs
- SafeFindHandle.cs
- RemotingConfiguration.cs
- CollectionsUtil.cs
- SqlAliaser.cs
- ResourceBinder.cs
- Parser.cs
- Oid.cs
- PreloadedPackages.cs
- HttpResponseBase.cs
- ControlParameter.cs
- SpellCheck.cs
- EventSetterHandlerConverter.cs
- SecurityContextTokenValidationException.cs
- XmlSigningNodeWriter.cs
- BehaviorEditorPart.cs
- TreeWalkHelper.cs
- RequiredFieldValidator.cs
- Lasso.cs
- OperationAbortedException.cs
- EditorZone.cs
- FrameworkContentElement.cs
- SessionSwitchEventArgs.cs
- DurableOperationContext.cs
- DataServiceResponse.cs
- TreeNodeStyleCollection.cs
- PriorityQueue.cs
- ListChangedEventArgs.cs
- EpmTargetTree.cs
- SessionEndingCancelEventArgs.cs
- WebPartEditorApplyVerb.cs
- PageFunction.cs
- ApplicationFileParser.cs
- FileDialogPermission.cs
- QilStrConcatenator.cs
- NativeMethods.cs
- EntityDataSourceMemberPath.cs
- ObjectAssociationEndMapping.cs
- Mutex.cs
- LocatorPart.cs
- TablePattern.cs
- DataGridBoolColumn.cs
- WebGetAttribute.cs
- MenuItem.cs
- SolidColorBrush.cs
- VisualBrush.cs
- CoreChannel.cs
- HGlobalSafeHandle.cs
- FilterQuery.cs
- ComUdtElement.cs
- WizardStepBase.cs
- XmlCompatibilityReader.cs
- SHA256Managed.cs
- XPathParser.cs
- EndGetFileNameFromUserRequest.cs
- RichTextBox.cs
- QuaternionIndependentAnimationStorage.cs
- CacheRequest.cs
- BStrWrapper.cs
- UnitySerializationHolder.cs
- HitTestDrawingContextWalker.cs
- PassportAuthenticationModule.cs
- TemplatePagerField.cs
- FeatureSupport.cs
- CodeChecksumPragma.cs
- SerialPinChanges.cs