Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Framework / MS / Internal / Text / MarkerProperties.cs / 1 / MarkerProperties.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // // File: MarkerProperties.cs // // Description: Marker properties. // // History: // 06/06/2003 : grzegorz - created. // 07/18/2003 : grzegorz - converted to new Property Engine. // //--------------------------------------------------------------------------- using System; using System.Windows; using System.Windows.Documents; using System.Windows.Media.TextFormatting; using MS.Internal.PtsHost.UnsafeNativeMethods; // Relative line height from PTS namespace MS.Internal.Text { // --------------------------------------------------------------------- // Marker properties. // --------------------------------------------------------------------- internal sealed class MarkerProperties { ////// Constructor. /// ////// The listWidth parameter gives the width of the list element, and is used to clip the MarkerOffset value /// internal MarkerProperties(List list, int index) { _offset = list.MarkerOffset; // Negative value for offset because it is required by TextFormatter line box model. // If offset is NaN - default value - set it as 0.5 * line height if (Double.IsNaN(_offset)) { // Obtain list's line height to set defualt marker offsert double lineHeight = DynamicPropertyReader.GetLineHeightValue(list); _offset = - 0.5 * lineHeight; } else { _offset = -_offset; } _style = list.MarkerStyle; _index = index; } // ------------------------------------------------------------------ // GetTextMarkerProperties // ----------------------------------------------------------------- internal TextMarkerProperties GetTextMarkerProperties(TextParagraphProperties textParaProps) { return new TextSimpleMarkerProperties(_style, _offset, _index, textParaProps); } // ------------------------------------------------------------------ // Marker style // ------------------------------------------------------------------ private TextMarkerStyle _style; // ----------------------------------------------------------------- // Distance from line start to the end of the marker symbol. // ------------------------------------------------------------------ private double _offset; // ----------------------------------------------------------------- // Autonumbering counter of counter-style marker. // ----------------------------------------------------------------- private int _index; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // // File: MarkerProperties.cs // // Description: Marker properties. // // History: // 06/06/2003 : grzegorz - created. // 07/18/2003 : grzegorz - converted to new Property Engine. // //--------------------------------------------------------------------------- using System; using System.Windows; using System.Windows.Documents; using System.Windows.Media.TextFormatting; using MS.Internal.PtsHost.UnsafeNativeMethods; // Relative line height from PTS namespace MS.Internal.Text { // --------------------------------------------------------------------- // Marker properties. // --------------------------------------------------------------------- internal sealed class MarkerProperties { ////// Constructor. /// ////// The listWidth parameter gives the width of the list element, and is used to clip the MarkerOffset value /// internal MarkerProperties(List list, int index) { _offset = list.MarkerOffset; // Negative value for offset because it is required by TextFormatter line box model. // If offset is NaN - default value - set it as 0.5 * line height if (Double.IsNaN(_offset)) { // Obtain list's line height to set defualt marker offsert double lineHeight = DynamicPropertyReader.GetLineHeightValue(list); _offset = - 0.5 * lineHeight; } else { _offset = -_offset; } _style = list.MarkerStyle; _index = index; } // ------------------------------------------------------------------ // GetTextMarkerProperties // ----------------------------------------------------------------- internal TextMarkerProperties GetTextMarkerProperties(TextParagraphProperties textParaProps) { return new TextSimpleMarkerProperties(_style, _offset, _index, textParaProps); } // ------------------------------------------------------------------ // Marker style // ------------------------------------------------------------------ private TextMarkerStyle _style; // ----------------------------------------------------------------- // Distance from line start to the end of the marker symbol. // ------------------------------------------------------------------ private double _offset; // ----------------------------------------------------------------- // Autonumbering counter of counter-style marker. // ----------------------------------------------------------------- private int _index; } } // 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
- OperationExecutionFault.cs
- PrtCap_Reader.cs
- StateDesigner.Layouts.cs
- ListViewUpdatedEventArgs.cs
- TagPrefixCollection.cs
- RadioButtonBaseAdapter.cs
- XmlCollation.cs
- TextBlockAutomationPeer.cs
- COM2Enum.cs
- RequestStatusBarUpdateEventArgs.cs
- MasterPageBuildProvider.cs
- NaturalLanguageHyphenator.cs
- EventDescriptor.cs
- EntityObject.cs
- MediaCommands.cs
- SqlMethodTransformer.cs
- Substitution.cs
- ToolStripContentPanelRenderEventArgs.cs
- EditBehavior.cs
- RijndaelCryptoServiceProvider.cs
- StyleCollection.cs
- SqlBulkCopyColumnMapping.cs
- SystemIPInterfaceProperties.cs
- DataColumnMappingCollection.cs
- ClientBuildManagerCallback.cs
- RelatedImageListAttribute.cs
- XmlExtensionFunction.cs
- XmlCharCheckingReader.cs
- TypeDescriptorFilterService.cs
- XhtmlTextWriter.cs
- StorageAssociationSetMapping.cs
- ContentOperations.cs
- WindowsFormsHostPropertyMap.cs
- DrawingState.cs
- TrackingConditionCollection.cs
- OraclePermissionAttribute.cs
- EncryptedType.cs
- PeerObject.cs
- PropertyTabAttribute.cs
- PtsPage.cs
- XPathNavigator.cs
- CalendarKeyboardHelper.cs
- Point3DAnimationBase.cs
- ToolStripItemCollection.cs
- GACMembershipCondition.cs
- SimpleFieldTemplateUserControl.cs
- FormsAuthenticationUser.cs
- XmlAttributeCollection.cs
- BeginEvent.cs
- TextEffectResolver.cs
- DynamicPropertyHolder.cs
- SafeWaitHandle.cs
- DESCryptoServiceProvider.cs
- ExpressionTable.cs
- QueryLifecycle.cs
- TempFiles.cs
- DoubleCollectionConverter.cs
- SimpleExpression.cs
- MediaContextNotificationWindow.cs
- CompensationDesigner.cs
- GACIdentityPermission.cs
- XmlSchema.cs
- ExpressionParser.cs
- ZoneLinkButton.cs
- AmbientProperties.cs
- HtmlControl.cs
- Rotation3D.cs
- MonthChangedEventArgs.cs
- StorageMappingItemCollection.cs
- httpstaticobjectscollection.cs
- DataBindingHandlerAttribute.cs
- Overlapped.cs
- TreePrinter.cs
- TextSerializer.cs
- xmlsaver.cs
- InputMethod.cs
- IndentedWriter.cs
- FontWeightConverter.cs
- CompressionTransform.cs
- GenericUI.cs
- ContextMenuStripActionList.cs
- GetFileNameResult.cs
- MenuAdapter.cs
- ActivityBuilderHelper.cs
- DebugView.cs
- CmsInterop.cs
- GeneralTransformGroup.cs
- ConstraintEnumerator.cs
- Metadata.cs
- Root.cs
- GeometryModel3D.cs
- _DomainName.cs
- ResetableIterator.cs
- StringAnimationBase.cs
- HighlightComponent.cs
- EditingMode.cs
- DbSource.cs
- CompilerLocalReference.cs
- XmlSchemaObject.cs
- StringDictionaryEditor.cs