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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WindowsPen.cs
- XhtmlTextWriter.cs
- DllNotFoundException.cs
- AspNetHostingPermission.cs
- Win32PrintDialog.cs
- DrawingAttributes.cs
- ControlValuePropertyAttribute.cs
- MatrixValueSerializer.cs
- ExpanderAutomationPeer.cs
- PackWebRequestFactory.cs
- NeutralResourcesLanguageAttribute.cs
- MruCache.cs
- ExpandCollapseProviderWrapper.cs
- ToolboxService.cs
- StatusBarPanelClickEvent.cs
- DataServicePagingProviderWrapper.cs
- DataServiceHostWrapper.cs
- NavigatingCancelEventArgs.cs
- SchemaMapping.cs
- Html32TextWriter.cs
- StrokeCollection.cs
- FigureParagraph.cs
- __Filters.cs
- BitmapInitialize.cs
- CodeArgumentReferenceExpression.cs
- _PooledStream.cs
- VolatileEnlistmentState.cs
- OverlappedAsyncResult.cs
- HexParser.cs
- VirtualizingPanel.cs
- ListControl.cs
- PromptEventArgs.cs
- NestedContainer.cs
- NavigationWindow.cs
- SystemIPGlobalProperties.cs
- XPathArrayIterator.cs
- X509PeerCertificateAuthenticationElement.cs
- ActivityDesigner.cs
- BitmapFrameEncode.cs
- RijndaelCryptoServiceProvider.cs
- PermissionListSet.cs
- SqlRewriteScalarSubqueries.cs
- XmlDataDocument.cs
- SiteOfOriginPart.cs
- QilList.cs
- File.cs
- Constants.cs
- Message.cs
- SequenceNumber.cs
- OciLobLocator.cs
- DesignerActionVerbItem.cs
- PropVariant.cs
- clipboard.cs
- ExpandedWrapper.cs
- CharAnimationBase.cs
- WebFormDesignerActionService.cs
- XmlNodeReader.cs
- ConfigurationPermission.cs
- InputLanguage.cs
- Label.cs
- DataColumnChangeEvent.cs
- Ipv6Element.cs
- TileModeValidation.cs
- _LazyAsyncResult.cs
- FacetEnabledSchemaElement.cs
- CheckStoreFileValidityRequest.cs
- AsmxEndpointPickerExtension.cs
- HistoryEventArgs.cs
- TabItemWrapperAutomationPeer.cs
- ValidatorCollection.cs
- QueryTaskGroupState.cs
- WorkflowRuntimeService.cs
- XmlRawWriterWrapper.cs
- SchemaTableColumn.cs
- FastEncoder.cs
- LineServices.cs
- XmlSchemaComplexType.cs
- PageClientProxyGenerator.cs
- ControllableStoryboardAction.cs
- SQLDateTime.cs
- ConstNode.cs
- EntitySet.cs
- PropertyEntry.cs
- TextDocumentView.cs
- HandleCollector.cs
- GeneralTransform3DTo2D.cs
- OracleParameter.cs
- SecurityContext.cs
- RenderDataDrawingContext.cs
- Pair.cs
- RootBrowserWindowAutomationPeer.cs
- ReversePositionQuery.cs
- TextRangeEditTables.cs
- SerialErrors.cs
- DataGridViewColumn.cs
- AsyncResult.cs
- ExpressionPrefixAttribute.cs
- MessagingDescriptionAttribute.cs
- RightNameExpirationInfoPair.cs
- XmlAttributeCollection.cs