Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / MS / Internal / Text / MarkerProperties.cs / 1305600 / MarkerProperties.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // // File: MarkerProperties.cs // // Description: Marker properties. // // History: // 06/06/2003 : [....] - created. // 07/18/2003 : [....] - 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 : [....] - created. // 07/18/2003 : [....] - 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
- GetKeyedHashRequest.cs
- EditorZoneBase.cs
- EditorPartChrome.cs
- LinqDataSourceEditData.cs
- CombinedGeometry.cs
- DataGridViewCellConverter.cs
- CopyAction.cs
- WindowsEditBox.cs
- TimeSpanValidatorAttribute.cs
- RemoteWebConfigurationHost.cs
- TextContainerChangedEventArgs.cs
- HideDisabledControlAdapter.cs
- MouseGestureConverter.cs
- StreamResourceInfo.cs
- Random.cs
- ValidationErrorInfo.cs
- TripleDESCryptoServiceProvider.cs
- RoleProviderPrincipal.cs
- SerializationAttributes.cs
- MenuItemStyle.cs
- StringBuilder.cs
- HtmlTableRowCollection.cs
- SafeRightsManagementEnvironmentHandle.cs
- ValueOfAction.cs
- MD5CryptoServiceProvider.cs
- Panel.cs
- mda.cs
- SharedDp.cs
- FormViewDeletedEventArgs.cs
- ResourceContainer.cs
- OpenTypeMethods.cs
- VariableElement.cs
- ServiceAuthorizationElement.cs
- webeventbuffer.cs
- StorageComplexPropertyMapping.cs
- IntSecurity.cs
- DbDataReader.cs
- MergeFilterQuery.cs
- sitestring.cs
- InternalTypeHelper.cs
- IssuanceLicense.cs
- _ConnectStream.cs
- WmlControlAdapter.cs
- Int32RectConverter.cs
- InsufficientExecutionStackException.cs
- Crc32.cs
- ToolStripItemImageRenderEventArgs.cs
- Exceptions.cs
- ToolStripItemTextRenderEventArgs.cs
- UserValidatedEventArgs.cs
- COSERVERINFO.cs
- ListItemParagraph.cs
- SystemDiagnosticsSection.cs
- SerTrace.cs
- TableDetailsRow.cs
- Canvas.cs
- ElementHost.cs
- SourceFileBuildProvider.cs
- FileRecordSequenceCompletedAsyncResult.cs
- XmlNamedNodeMap.cs
- ProcessModelInfo.cs
- _SSPIWrapper.cs
- OciHandle.cs
- QueuePropertyVariants.cs
- CorrelationManager.cs
- SqlTransaction.cs
- SafeNativeMethods.cs
- RectangleConverter.cs
- EntityDataSourceView.cs
- ResourcesGenerator.cs
- XmlIgnoreAttribute.cs
- FlowLayout.cs
- TypeUsageBuilder.cs
- ActivitiesCollection.cs
- FamilyMap.cs
- StrokeRenderer.cs
- AnimationClockResource.cs
- Transform3DGroup.cs
- AuthenticodeSignatureInformation.cs
- FileInfo.cs
- CombinedTcpChannel.cs
- ClientProtocol.cs
- SafeTimerHandle.cs
- Root.cs
- DelegatedStream.cs
- AnnotationStore.cs
- EntitySet.cs
- IdentifierCollection.cs
- NumberAction.cs
- SqlDependency.cs
- AssociationEndMember.cs
- SizeKeyFrameCollection.cs
- ScalarConstant.cs
- WebExceptionStatus.cs
- XmlWhitespace.cs
- Span.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- CssTextWriter.cs
- ProxyFragment.cs
- SecureEnvironment.cs