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
- RelativeSource.cs
- XmlDictionaryReader.cs
- OleServicesContext.cs
- ListItemsPage.cs
- InvalidDataContractException.cs
- PriorityQueue.cs
- DrawingGroup.cs
- WebScriptEnablingBehavior.cs
- RichTextBox.cs
- MaskPropertyEditor.cs
- StyleSelector.cs
- TemplateParser.cs
- ResourceDescriptionAttribute.cs
- DetailsViewPageEventArgs.cs
- OutgoingWebRequestContext.cs
- AspNetPartialTrustHelpers.cs
- Column.cs
- PathStreamGeometryContext.cs
- SqlDataSourceQueryEditorForm.cs
- OptimizedTemplateContent.cs
- SubqueryRules.cs
- DataGridColumn.cs
- XamlPoint3DCollectionSerializer.cs
- IndependentAnimationStorage.cs
- VScrollProperties.cs
- ToolBarOverflowPanel.cs
- TargetControlTypeAttribute.cs
- KeyValueConfigurationElement.cs
- GeneralTransform.cs
- TypeElement.cs
- PageSetupDialog.cs
- ByteStream.cs
- ColumnReorderedEventArgs.cs
- ContainerControl.cs
- DataRecordInfo.cs
- StaticFileHandler.cs
- ThaiBuddhistCalendar.cs
- WebZone.cs
- XmlSerializationReader.cs
- ConfigXmlSignificantWhitespace.cs
- DecoderNLS.cs
- SecurityDocument.cs
- DataServiceHost.cs
- MetafileHeaderWmf.cs
- SQLSingle.cs
- GenerateHelper.cs
- Sql8ExpressionRewriter.cs
- IndexingContentUnit.cs
- HexParser.cs
- BinaryConverter.cs
- TypeHelpers.cs
- BitmapEffectInput.cs
- VirtualPathProvider.cs
- WebPartVerbCollection.cs
- SchemaType.cs
- HtmlEmptyTagControlBuilder.cs
- SqlProfileProvider.cs
- TraceData.cs
- PenLineCapValidation.cs
- ConvertEvent.cs
- DetailsViewModeEventArgs.cs
- ZipIOBlockManager.cs
- RtType.cs
- XPathPatternParser.cs
- Visual3DCollection.cs
- NullReferenceException.cs
- Label.cs
- DependencyPropertyAttribute.cs
- GeneralTransform2DTo3DTo2D.cs
- TextParaClient.cs
- MediaTimeline.cs
- GeneralTransform3D.cs
- XmlDataSourceNodeDescriptor.cs
- SimpleWebHandlerParser.cs
- UniformGrid.cs
- CodeAttachEventStatement.cs
- ProxyElement.cs
- RouteItem.cs
- PeerApplicationLaunchInfo.cs
- DesignerDataConnection.cs
- XamlTypeWithExplicitNamespace.cs
- XamlSerializationHelper.cs
- MDIControlStrip.cs
- StorageEntitySetMapping.cs
- SqlDelegatedTransaction.cs
- UnsafeNativeMethods.cs
- EventProxy.cs
- DataGridColumn.cs
- ProviderException.cs
- AddressingVersion.cs
- UnwrappedTypesXmlSerializerManager.cs
- WriteableOnDemandStream.cs
- WindowsFont.cs
- TextParagraphView.cs
- EntityDataSourceUtil.cs
- FlowDocumentPage.cs
- MetadataArtifactLoaderCompositeResource.cs
- AnimationStorage.cs
- SqlRetyper.cs
- SmiMetaDataProperty.cs