Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- SearchForVirtualItemEventArgs.cs
- AnyReturnReader.cs
- MembershipSection.cs
- Classification.cs
- ResponseStream.cs
- RegexCompilationInfo.cs
- UtilityExtension.cs
- WindowsScrollBarBits.cs
- RangeValuePattern.cs
- SchemaCollectionCompiler.cs
- IndentedWriter.cs
- DataBindingValueUIHandler.cs
- mda.cs
- GlobalId.cs
- MatrixCamera.cs
- PerfCounterSection.cs
- ResolveMatchesApril2005.cs
- ValidationUtility.cs
- CellParaClient.cs
- UserControl.cs
- IDispatchConstantAttribute.cs
- ContainerUtilities.cs
- FormViewInsertEventArgs.cs
- SkinBuilder.cs
- SafeMILHandle.cs
- DockAndAnchorLayout.cs
- ListViewItem.cs
- ObjectSet.cs
- Environment.cs
- WebPartHeaderCloseVerb.cs
- MenuAdapter.cs
- TemplateBuilder.cs
- BamlLocalizer.cs
- StateItem.cs
- ToolTip.cs
- RecordsAffectedEventArgs.cs
- SizeConverter.cs
- ObjectView.cs
- AddInProcess.cs
- DrawingImage.cs
- WinFormsUtils.cs
- SystemInfo.cs
- CreateUserErrorEventArgs.cs
- BordersPage.cs
- PolicyAssertionCollection.cs
- Int64Animation.cs
- GridProviderWrapper.cs
- PopupRoot.cs
- Emitter.cs
- WebPartHeaderCloseVerb.cs
- CustomErrorCollection.cs
- InternalBase.cs
- StrokeNodeEnumerator.cs
- CanExecuteRoutedEventArgs.cs
- AttributeSetAction.cs
- AvTrace.cs
- TypedDataSetSchemaImporterExtensionFx35.cs
- cookiecontainer.cs
- FamilyCollection.cs
- _FtpControlStream.cs
- DrawingAttributesDefaultValueFactory.cs
- WindowsRichEditRange.cs
- LinearGradientBrush.cs
- ArgumentException.cs
- TextViewElement.cs
- DataGridViewRowConverter.cs
- RadioButton.cs
- ClientType.cs
- XmlSerializerFormatAttribute.cs
- BasicExpressionVisitor.cs
- DataGrid.cs
- SwitchElementsCollection.cs
- TraceContextRecord.cs
- FormsAuthenticationCredentials.cs
- BoundColumn.cs
- DesignerRegionCollection.cs
- DataGridViewHeaderCell.cs
- StatusBarItem.cs
- XmlCDATASection.cs
- SafeRightsManagementSessionHandle.cs
- HierarchicalDataSourceDesigner.cs
- ConfigurationSectionCollection.cs
- DataGridItemCollection.cs
- DataGridPagingPage.cs
- Vector3D.cs
- GridViewEditEventArgs.cs
- XmlElementAttributes.cs
- ThreadPool.cs
- URIFormatException.cs
- Resources.Designer.cs
- TextWriterEngine.cs
- CatalogPartCollection.cs
- EffectiveValueEntry.cs
- KeyTimeConverter.cs
- DirectoryInfo.cs
- SqlDataSourceTableQuery.cs
- UniqueIdentifierService.cs
- ProfileGroupSettingsCollection.cs
- HelpInfo.cs
- X509ThumbprintKeyIdentifierClause.cs