Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- AttachedPropertyBrowsableAttribute.cs
- BitmapEffectState.cs
- RecordConverter.cs
- DataGridPagerStyle.cs
- ProgressBarRenderer.cs
- DataColumnMappingCollection.cs
- SchemaImporter.cs
- LogWriteRestartAreaAsyncResult.cs
- EncoderParameters.cs
- LineProperties.cs
- LazyLoadBehavior.cs
- DataControlImageButton.cs
- NavigatorOutput.cs
- LineInfo.cs
- MetadataArtifactLoader.cs
- EventHandlerList.cs
- RelationshipEnd.cs
- AnnotationDocumentPaginator.cs
- JoinCqlBlock.cs
- RSAOAEPKeyExchangeDeformatter.cs
- GPStream.cs
- FontSizeConverter.cs
- WebPartUtil.cs
- ClientData.cs
- IDQuery.cs
- XmlSchemaIdentityConstraint.cs
- SelectionList.cs
- EtwTrace.cs
- AnnotationResourceChangedEventArgs.cs
- FastEncoderWindow.cs
- PrimitiveCodeDomSerializer.cs
- BindingSource.cs
- ThicknessKeyFrameCollection.cs
- CultureInfo.cs
- _ListenerResponseStream.cs
- ContentElementAutomationPeer.cs
- BinaryMessageEncoder.cs
- GlyphingCache.cs
- LayoutInformation.cs
- PriorityItem.cs
- OdbcConnectionHandle.cs
- InvalidPrinterException.cs
- Helpers.cs
- UniqueConstraint.cs
- SharedConnectionWorkflowTransactionService.cs
- AutomationPeer.cs
- FormParameter.cs
- XmlIlVisitor.cs
- SymbolEqualComparer.cs
- ExeContext.cs
- SspiSafeHandles.cs
- MinimizableAttributeTypeConverter.cs
- ProjectedSlot.cs
- PersistenceProvider.cs
- PrincipalPermission.cs
- COM2ExtendedTypeConverter.cs
- BaseAddressElement.cs
- CLSCompliantAttribute.cs
- PropertyBuilder.cs
- AVElementHelper.cs
- MenuAutoFormat.cs
- CapabilitiesState.cs
- SqlGatherConsumedAliases.cs
- DataGridViewImageCell.cs
- SafeSecurityHandles.cs
- ReadOnlyHierarchicalDataSource.cs
- ReferencedAssembly.cs
- LineUtil.cs
- PropertyGeneratedEventArgs.cs
- SymbolEqualComparer.cs
- TypeLibConverter.cs
- _Events.cs
- WebControl.cs
- ClientRuntimeConfig.cs
- SecUtil.cs
- PermissionAttributes.cs
- MessageQueueEnumerator.cs
- EventHandlersDesigner.cs
- TCPListener.cs
- RightsManagementEncryptedStream.cs
- XmlConvert.cs
- QuestionEventArgs.cs
- MembershipSection.cs
- DesignBindingEditor.cs
- CheckBox.cs
- SrgsElementList.cs
- MethodImplAttribute.cs
- RectangleGeometry.cs
- IgnoreFileBuildProvider.cs
- RadioButtonList.cs
- FormsAuthenticationModule.cs
- OleDbParameterCollection.cs
- cookie.cs
- DataGridState.cs
- SafeIUnknown.cs
- FloatMinMaxAggregationOperator.cs
- PathTooLongException.cs
- MappingModelBuildProvider.cs
- PartBasedPackageProperties.cs
- ValueSerializerAttribute.cs