Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- AdRotatorDesigner.cs
- _ListenerRequestStream.cs
- CacheDict.cs
- FunctionDescription.cs
- MachineKeyConverter.cs
- CompilerParameters.cs
- DynamicMethod.cs
- DateTimeConstantAttribute.cs
- AssemblyGen.cs
- Calendar.cs
- AutomationElement.cs
- URLIdentityPermission.cs
- MissingSatelliteAssemblyException.cs
- XmlWriter.cs
- MobileUserControl.cs
- HtmlTableRowCollection.cs
- LocalBuilder.cs
- HotSpot.cs
- CodeObject.cs
- _AuthenticationState.cs
- OracleFactory.cs
- FontFaceLayoutInfo.cs
- ConnectionPointGlyph.cs
- CommonObjectSecurity.cs
- SolidColorBrush.cs
- DBSchemaRow.cs
- Membership.cs
- EdmFunctions.cs
- CacheHelper.cs
- MapPathBasedVirtualPathProvider.cs
- ProfilePropertySettingsCollection.cs
- ControlValuePropertyAttribute.cs
- InputScopeAttribute.cs
- SerialPinChanges.cs
- KeyFrames.cs
- XamlHostingConfiguration.cs
- VersionUtil.cs
- TextWriterTraceListener.cs
- PenThread.cs
- DLinqAssociationProvider.cs
- ControlParser.cs
- AuthenticationModulesSection.cs
- OleDbConnectionFactory.cs
- ComponentResourceManager.cs
- PeerPresenceInfo.cs
- XslException.cs
- TreeNode.cs
- httpserverutility.cs
- _CommandStream.cs
- ByteStreamMessageEncoderFactory.cs
- PathFigureCollection.cs
- Expr.cs
- MD5.cs
- SharedConnectionWorkflowTransactionService.cs
- MessageSecurityVersionConverter.cs
- WebResourceAttribute.cs
- ListBoxItemWrapperAutomationPeer.cs
- DataContractSerializerElement.cs
- OdbcUtils.cs
- PersistencePipeline.cs
- DataBinder.cs
- TableLayoutRowStyleCollection.cs
- ObjectStateManagerMetadata.cs
- GridPattern.cs
- ReplyChannelAcceptor.cs
- _BaseOverlappedAsyncResult.cs
- Timeline.cs
- MenuItemAutomationPeer.cs
- PrintDocument.cs
- CryptoProvider.cs
- UniformGrid.cs
- TranslateTransform.cs
- RuleElement.cs
- WindowsListBox.cs
- DataServiceKeyAttribute.cs
- WebPartVerbsEventArgs.cs
- SHA1Managed.cs
- EdmToObjectNamespaceMap.cs
- SHA384.cs
- WindowsAuthenticationEventArgs.cs
- AddInServer.cs
- RelatedPropertyManager.cs
- VirtualizedCellInfoCollection.cs
- StylusPointProperties.cs
- XmlNodeChangedEventArgs.cs
- BrowserCapabilitiesCompiler.cs
- GraphicsState.cs
- MethodBuilder.cs
- ContainerFilterService.cs
- wpf-etw.cs
- ReadContentAsBinaryHelper.cs
- DataPagerFieldCommandEventArgs.cs
- x509store.cs
- FixedSOMTableCell.cs
- HtmlElementErrorEventArgs.cs
- PresentationAppDomainManager.cs
- CoTaskMemSafeHandle.cs
- MenuCommandService.cs
- Token.cs
- DockPanel.cs