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
- WebConvert.cs
- CodeTypeDeclarationCollection.cs
- PrefixQName.cs
- DataGridAutoFormat.cs
- XmlSchemaAppInfo.cs
- CommandBindingCollection.cs
- EnumValAlphaComparer.cs
- GlyphElement.cs
- UriSectionReader.cs
- Socket.cs
- CalendarAutomationPeer.cs
- DuplexChannelBinder.cs
- Char.cs
- AdPostCacheSubstitution.cs
- DataObjectEventArgs.cs
- TraceProvider.cs
- safePerfProviderHandle.cs
- QilLiteral.cs
- HighlightVisual.cs
- TdsEnums.cs
- ZoomPercentageConverter.cs
- ParameterCollection.cs
- srgsitem.cs
- CheckedPointers.cs
- TemplatedAdorner.cs
- ValidatingPropertiesEventArgs.cs
- WebBrowserHelper.cs
- ModuleBuilder.cs
- RawStylusInputReport.cs
- SoapExtensionStream.cs
- CutCopyPasteHelper.cs
- AssemblyBuilder.cs
- OleDbParameterCollection.cs
- XPathSelfQuery.cs
- CodeAssignStatement.cs
- CodeDomConfigurationHandler.cs
- HttpsChannelListener.cs
- SelectiveScrollingGrid.cs
- MetricEntry.cs
- BindingSource.cs
- Compiler.cs
- CaseStatement.cs
- DataSourceNameHandler.cs
- unitconverter.cs
- QuadraticEase.cs
- ReturnType.cs
- XmlWriter.cs
- CacheManager.cs
- XamlPoint3DCollectionSerializer.cs
- ErrorTableItemStyle.cs
- CustomErrorCollection.cs
- StreamGeometry.cs
- HtmlSelect.cs
- ChtmlTextWriter.cs
- SecUtil.cs
- InitializationEventAttribute.cs
- SharedHttpsTransportManager.cs
- DocComment.cs
- ObjectDataSource.cs
- NamedElement.cs
- InputScopeAttribute.cs
- XmlElementCollection.cs
- SerializationObjectManager.cs
- NonVisualControlAttribute.cs
- SynchronizingStream.cs
- CodeLabeledStatement.cs
- BadImageFormatException.cs
- RubberbandSelector.cs
- DBCSCodePageEncoding.cs
- RowToParametersTransformer.cs
- Line.cs
- CodeEventReferenceExpression.cs
- odbcmetadatacollectionnames.cs
- Block.cs
- ModifiableIteratorCollection.cs
- EventMappingSettings.cs
- BindableAttribute.cs
- TextElementEnumerator.cs
- ChannelManager.cs
- QueryStringParameter.cs
- MinMaxParagraphWidth.cs
- XmlSignatureProperties.cs
- XmlNode.cs
- BitmapSource.cs
- ContentDisposition.cs
- FlowPosition.cs
- BaseCollection.cs
- ProtocolElement.cs
- UserControl.cs
- Touch.cs
- DriveNotFoundException.cs
- SafeCryptHandles.cs
- StringOutput.cs
- XmlWriterSettings.cs
- IdnElement.cs
- Int64Storage.cs
- SmiMetaDataProperty.cs
- SRDisplayNameAttribute.cs
- XmlSchemaExporter.cs
- PlainXmlWriter.cs