Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CacheVirtualItemsEvent.cs
- TextBlockAutomationPeer.cs
- Material.cs
- GetParentChain.cs
- HttpListenerPrefixCollection.cs
- ListViewSelectEventArgs.cs
- AdapterUtil.cs
- TemplateControlCodeDomTreeGenerator.cs
- NullableConverter.cs
- RemoteWebConfigurationHostServer.cs
- IssuedSecurityTokenParameters.cs
- EqualityComparer.cs
- PackageStore.cs
- XmlAttributeCollection.cs
- OutputCacheProfileCollection.cs
- TraceSection.cs
- MetadataPropertyAttribute.cs
- XmlChoiceIdentifierAttribute.cs
- ButtonStandardAdapter.cs
- IntSecurity.cs
- BorderGapMaskConverter.cs
- PersonalizationProviderCollection.cs
- ExpressionWriter.cs
- LingerOption.cs
- Polyline.cs
- GlobalEventManager.cs
- XmlAttributeProperties.cs
- selecteditemcollection.cs
- SqlErrorCollection.cs
- GradientStop.cs
- BamlRecords.cs
- MemberPath.cs
- TimelineGroup.cs
- MeasureData.cs
- InvalidOperationException.cs
- WpfMemberInvoker.cs
- WaveHeader.cs
- MessageDecoder.cs
- Misc.cs
- WindowsContainer.cs
- CodeStatement.cs
- Literal.cs
- StringExpressionSet.cs
- MediaSystem.cs
- InheritanceRules.cs
- Quad.cs
- XhtmlBasicCommandAdapter.cs
- RenderData.cs
- TreeViewEvent.cs
- Brush.cs
- ErrorInfoXmlDocument.cs
- AssemblyAssociatedContentFileAttribute.cs
- ProcessModule.cs
- WebConfigManager.cs
- SqlPersonalizationProvider.cs
- ValidatingReaderNodeData.cs
- DiagnosticTraceSchemas.cs
- MenuItemBindingCollection.cs
- StylusPlugin.cs
- CodeTypeReferenceCollection.cs
- CryptoApi.cs
- X509CertificateClaimSet.cs
- ControlTemplate.cs
- controlskin.cs
- SqlRewriteScalarSubqueries.cs
- RouteData.cs
- TextBlock.cs
- EntityDesignerUtils.cs
- ObjectQueryState.cs
- AddingNewEventArgs.cs
- CompilerInfo.cs
- HttpResponseHeader.cs
- iisPickupDirectory.cs
- TextModifierScope.cs
- DynamicExpression.cs
- RubberbandSelector.cs
- Console.cs
- DataServiceException.cs
- ProtocolsSection.cs
- SQLDateTime.cs
- NativeMethods.cs
- AdCreatedEventArgs.cs
- IntSecurity.cs
- XmlNodeChangedEventArgs.cs
- HttpInputStream.cs
- UnaryExpression.cs
- ZoneButton.cs
- StackOverflowException.cs
- TimeManager.cs
- ConfigurationPropertyAttribute.cs
- ZipIOFileItemStream.cs
- WindowsToolbar.cs
- SqlStream.cs
- HybridDictionary.cs
- EventLogPermissionAttribute.cs
- SafeLocalAllocation.cs
- ClientOptions.cs
- SourceElementsCollection.cs
- DependencyPropertyValueSerializer.cs
- TemplateControlCodeDomTreeGenerator.cs