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
- BroadcastEventHelper.cs
- GrammarBuilderWildcard.cs
- ClockGroup.cs
- RequestUriProcessor.cs
- XPathArrayIterator.cs
- WpfGeneratedKnownProperties.cs
- InputLanguageCollection.cs
- KeyToListMap.cs
- RsaSecurityKey.cs
- StatusBarItem.cs
- ChtmlTextWriter.cs
- TableCellCollection.cs
- RegexRunnerFactory.cs
- ViewManager.cs
- DefaultTextStoreTextComposition.cs
- Model3DGroup.cs
- ScrollItemProviderWrapper.cs
- AddIn.cs
- dataprotectionpermission.cs
- XmlAttributeAttribute.cs
- ConstNode.cs
- OperationInvokerTrace.cs
- ReadOnlyTernaryTree.cs
- ToolTipService.cs
- EditingCoordinator.cs
- WSDualHttpSecurityMode.cs
- ResourceKey.cs
- ChtmlTextWriter.cs
- FilterableData.cs
- DataGridViewCell.cs
- MetafileHeader.cs
- PageStatePersister.cs
- XmlSerializerVersionAttribute.cs
- _KerberosClient.cs
- RootBrowserWindowProxy.cs
- SparseMemoryStream.cs
- LambdaExpression.cs
- BaseCodePageEncoding.cs
- CultureSpecificCharacterBufferRange.cs
- SignatureToken.cs
- HttpResponseHeader.cs
- CharacterBufferReference.cs
- XhtmlBasicFormAdapter.cs
- StrokeCollection2.cs
- _WebProxyDataBuilder.cs
- CodeBlockBuilder.cs
- AutomationPattern.cs
- RenderContext.cs
- ChannelManagerService.cs
- TextBoxAutoCompleteSourceConverter.cs
- SafeArrayRankMismatchException.cs
- XmlTextEncoder.cs
- ObjectDataSourceWizardForm.cs
- ZoomPercentageConverter.cs
- SqlInternalConnectionTds.cs
- Vector.cs
- ValueSerializerAttribute.cs
- DrawListViewColumnHeaderEventArgs.cs
- AccessText.cs
- ToolboxItemAttribute.cs
- SqlDataSourceEnumerator.cs
- TextSegment.cs
- KeyNotFoundException.cs
- SqlSelectClauseBuilder.cs
- SemanticResolver.cs
- mediaeventshelper.cs
- NamedPipeConnectionPool.cs
- WebOperationContext.cs
- AnnotationHelper.cs
- BinaryCommonClasses.cs
- SQLGuid.cs
- IntersectQueryOperator.cs
- CodeFieldReferenceExpression.cs
- StoreItemCollection.Loader.cs
- SQLDecimalStorage.cs
- HtmlContainerControl.cs
- fixedPageContentExtractor.cs
- sqlstateclientmanager.cs
- DatatypeImplementation.cs
- Win32.cs
- Vector3DIndependentAnimationStorage.cs
- safex509handles.cs
- RijndaelManaged.cs
- TypeValidationEventArgs.cs
- StructuralCache.cs
- RequestCacheEntry.cs
- CatalogZoneAutoFormat.cs
- DataGridViewRowStateChangedEventArgs.cs
- OneOfScalarConst.cs
- SessionStateItemCollection.cs
- DataGridLength.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- NotCondition.cs
- VisualStyleInformation.cs
- StylusEditingBehavior.cs
- CheckBoxList.cs
- XmlSchemaDocumentation.cs
- LogReserveAndAppendState.cs
- XmlWhitespace.cs
- ChannelManagerHelpers.cs