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
- PreApplicationStartMethodAttribute.cs
- XmlSerializer.cs
- Model3D.cs
- SoapEnvelopeProcessingElement.cs
- FontFamilyConverter.cs
- FlowDecisionLabelFeature.cs
- _AutoWebProxyScriptEngine.cs
- BitmapMetadataEnumerator.cs
- XPathAncestorIterator.cs
- PassportAuthenticationEventArgs.cs
- ToolStripPanelRenderEventArgs.cs
- FieldToken.cs
- NameNode.cs
- CacheAxisQuery.cs
- ConnectivityStatus.cs
- Drawing.cs
- ScriptControl.cs
- Command.cs
- InitializingNewItemEventArgs.cs
- TextChangedEventArgs.cs
- ObjectDataProvider.cs
- HostProtectionException.cs
- ErrorStyle.cs
- StringUtil.cs
- AttributeProviderAttribute.cs
- CqlGenerator.cs
- DataSourceControl.cs
- SqlDataSourceCache.cs
- MetadataWorkspace.cs
- ComponentCollection.cs
- SQLBytes.cs
- DynamicEndpointElement.cs
- XmlAttributes.cs
- ChildrenQuery.cs
- SqlRowUpdatedEvent.cs
- GlobalizationAssembly.cs
- DiscoveryClientReferences.cs
- TimeManager.cs
- ValidatedControlConverter.cs
- ValueQuery.cs
- _WebProxyDataBuilder.cs
- NavigationFailedEventArgs.cs
- StackSpiller.Generated.cs
- ItemCheckedEvent.cs
- sqlcontext.cs
- NetworkInterface.cs
- DataObjectFieldAttribute.cs
- CodeBlockBuilder.cs
- IntegerFacetDescriptionElement.cs
- RuleSet.cs
- InertiaTranslationBehavior.cs
- BindingsCollection.cs
- ToolbarAUtomationPeer.cs
- ProcessProtocolHandler.cs
- InvalidWMPVersionException.cs
- SimpleType.cs
- DatePickerDateValidationErrorEventArgs.cs
- MessageSmuggler.cs
- HTTPNotFoundHandler.cs
- RijndaelManaged.cs
- KeyBinding.cs
- SqlUdtInfo.cs
- Page.cs
- DesignerWebPartChrome.cs
- TrustLevel.cs
- AsymmetricSignatureDeformatter.cs
- DetailsViewPagerRow.cs
- DocumentPage.cs
- ClientUrlResolverWrapper.cs
- SchemaEntity.cs
- FontFamilyValueSerializer.cs
- MILUtilities.cs
- MSAANativeProvider.cs
- PropertyGridEditorPart.cs
- TableRowCollection.cs
- Model3DCollection.cs
- DbgCompiler.cs
- AuthorizationBehavior.cs
- ReliabilityContractAttribute.cs
- OracleColumn.cs
- ApplyImportsAction.cs
- COM2Properties.cs
- WorkflowServiceBehavior.cs
- SymbolUsageManager.cs
- DataGridViewCellParsingEventArgs.cs
- DesignerTextViewAdapter.cs
- _ConnectOverlappedAsyncResult.cs
- WebPartEditVerb.cs
- KeyGestureConverter.cs
- HistoryEventArgs.cs
- PermissionToken.cs
- MDIControlStrip.cs
- BackgroundFormatInfo.cs
- TextChangedEventArgs.cs
- SettingsProperty.cs
- GridViewRowCollection.cs
- OlePropertyStructs.cs
- SevenBitStream.cs
- followingsibling.cs
- StateBag.cs