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
- ColumnMapCopier.cs
- SchemaImporterExtensionElement.cs
- Html32TextWriter.cs
- MailAddress.cs
- FormViewCommandEventArgs.cs
- GeneralTransform3DGroup.cs
- HttpPostedFile.cs
- DistinctQueryOperator.cs
- Form.cs
- FormViewUpdateEventArgs.cs
- DataBoundControlHelper.cs
- NullableConverter.cs
- HtmlControlAdapter.cs
- EntityDataSourceDataSelectionPanel.designer.cs
- FillRuleValidation.cs
- QueryContext.cs
- WebPartsSection.cs
- NativeMethods.cs
- ConfigurationPermission.cs
- FastEncoderWindow.cs
- WorkflowInstance.cs
- CounterCreationDataCollection.cs
- ProtocolsSection.cs
- DBConnection.cs
- FontUnitConverter.cs
- XmlSchemas.cs
- RootBuilder.cs
- WaitHandleCannotBeOpenedException.cs
- DescriptionAttribute.cs
- BuiltInPermissionSets.cs
- ColumnMapProcessor.cs
- StorageConditionPropertyMapping.cs
- FileInfo.cs
- FormParameter.cs
- BitVec.cs
- OrderedDictionaryStateHelper.cs
- ComponentChangedEvent.cs
- Hashtable.cs
- ContentTextAutomationPeer.cs
- BindingElementCollection.cs
- CompositeActivityTypeDescriptor.cs
- CodeVariableReferenceExpression.cs
- EditorZone.cs
- Timer.cs
- MenuRendererStandards.cs
- _FixedSizeReader.cs
- MediaElement.cs
- FixedSOMPageElement.cs
- TimelineGroup.cs
- WebPartAuthorizationEventArgs.cs
- FamilyTypeface.cs
- TraceListener.cs
- ByteStreamMessageEncoder.cs
- ErrorFormatterPage.cs
- CodeSnippetTypeMember.cs
- PhoneCallDesigner.cs
- IsolatedStorage.cs
- PathSegmentCollection.cs
- EditorPartChrome.cs
- AlphaSortedEnumConverter.cs
- Nullable.cs
- URLIdentityPermission.cs
- ToggleButton.cs
- WindowPattern.cs
- MULTI_QI.cs
- UnauthorizedWebPart.cs
- FixUpCollection.cs
- ApplicationGesture.cs
- latinshape.cs
- WinEventWrap.cs
- CodeCommentStatement.cs
- TemplateNameScope.cs
- ControlValuePropertyAttribute.cs
- URLString.cs
- WmfPlaceableFileHeader.cs
- DbConnectionStringCommon.cs
- SplitContainer.cs
- ButtonBaseAdapter.cs
- SystemThemeKey.cs
- Geometry.cs
- HandlerBase.cs
- OracleRowUpdatingEventArgs.cs
- PropertyChangingEventArgs.cs
- ScriptModule.cs
- EntityDataSourceContainerNameItem.cs
- DataGridColumn.cs
- CompositeCollectionView.cs
- MonthChangedEventArgs.cs
- CalloutQueueItem.cs
- AlgoModule.cs
- SerializationAttributes.cs
- DataSourceGeneratorException.cs
- HuffModule.cs
- InternalSafeNativeMethods.cs
- AttributeCollection.cs
- DocumentApplicationJournalEntry.cs
- ReflectionPermission.cs
- TabPage.cs
- HierarchicalDataBoundControl.cs
- CodeDelegateInvokeExpression.cs