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
- SortDescription.cs
- MailAddressParser.cs
- AsymmetricSignatureFormatter.cs
- StorageBasedPackageProperties.cs
- InheritablePropertyChangeInfo.cs
- ListViewUpdateEventArgs.cs
- PointConverter.cs
- WindowsListViewGroupHelper.cs
- DummyDataSource.cs
- DynamicRendererThreadManager.cs
- FrameworkContentElement.cs
- XmlIlGenerator.cs
- TaskForm.cs
- WebBrowserHelper.cs
- GlyphElement.cs
- ListViewCancelEventArgs.cs
- XsdBuildProvider.cs
- KnownBoxes.cs
- CompiledRegexRunner.cs
- Vector3DAnimation.cs
- AlphabeticalEnumConverter.cs
- FixedFindEngine.cs
- QueryStringParameter.cs
- SQLBytes.cs
- TableRowGroup.cs
- FontClient.cs
- CodeVariableReferenceExpression.cs
- MDIWindowDialog.cs
- CatalogPartCollection.cs
- PageContentCollection.cs
- WarningException.cs
- CmsInterop.cs
- XmlSchemaException.cs
- ComplexBindingPropertiesAttribute.cs
- HwndKeyboardInputProvider.cs
- UpdateEventArgs.cs
- WebEventCodes.cs
- RecordManager.cs
- Dispatcher.cs
- ItemsControl.cs
- PeerTransportListenAddressValidator.cs
- HtmlEmptyTagControlBuilder.cs
- PriorityBinding.cs
- XmlDataImplementation.cs
- StandardToolWindows.cs
- BeginEvent.cs
- PtsPage.cs
- pingexception.cs
- Assert.cs
- TcpTransportSecurity.cs
- QilInvokeEarlyBound.cs
- SrgsToken.cs
- NotConverter.cs
- ConversionHelper.cs
- LinqDataSourceUpdateEventArgs.cs
- ExpressionList.cs
- AsyncResult.cs
- SchemaImporterExtensionElementCollection.cs
- TextParaClient.cs
- Stroke2.cs
- Baml2006ReaderSettings.cs
- PreloadedPackages.cs
- UpdateCompiler.cs
- ListItemCollection.cs
- OlePropertyStructs.cs
- DataView.cs
- XmlCharCheckingReader.cs
- OracleTransaction.cs
- SortedSet.cs
- GetWinFXPath.cs
- CorrelationManager.cs
- IndicFontClient.cs
- ModulesEntry.cs
- RadioButtonStandardAdapter.cs
- MediaEntryAttribute.cs
- XmlQualifiedName.cs
- PrintController.cs
- EditorPartChrome.cs
- FormsAuthenticationTicket.cs
- HMACSHA512.cs
- CoreSwitches.cs
- ActivityCodeDomSerializer.cs
- CredentialCache.cs
- BooleanFunctions.cs
- EntityUtil.cs
- InstalledVoice.cs
- SrgsRulesCollection.cs
- SemaphoreFullException.cs
- WindowsStatic.cs
- XmlDownloadManager.cs
- PropertyGeneratedEventArgs.cs
- ServiceBusyException.cs
- XPathDocumentBuilder.cs
- TargetFrameworkAttribute.cs
- DataControlPagerLinkButton.cs
- DependencyPropertyConverter.cs
- CurrencyWrapper.cs
- WebPartDeleteVerb.cs
- PkcsMisc.cs
- Viewport3DAutomationPeer.cs