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
- LocatorManager.cs
- RegexMatch.cs
- PageAsyncTaskManager.cs
- DependencyPropertyAttribute.cs
- TextSelectionHelper.cs
- LiteralTextParser.cs
- ElementHostPropertyMap.cs
- DeadCharTextComposition.cs
- InvalidWMPVersionException.cs
- Keyboard.cs
- InvalidComObjectException.cs
- BezierSegment.cs
- DebugView.cs
- TextProviderWrapper.cs
- XmlSchemaImporter.cs
- PersistenceException.cs
- CoreSwitches.cs
- HierarchicalDataSourceControl.cs
- MachineSettingsSection.cs
- _TransmitFileOverlappedAsyncResult.cs
- TargetControlTypeCache.cs
- MailHeaderInfo.cs
- CharAnimationUsingKeyFrames.cs
- DataViewListener.cs
- UnicastIPAddressInformationCollection.cs
- KeyPressEvent.cs
- UniformGrid.cs
- DockAndAnchorLayout.cs
- Guid.cs
- CustomPopupPlacement.cs
- shaperfactory.cs
- ComPlusTypeValidator.cs
- CounterSampleCalculator.cs
- BuilderPropertyEntry.cs
- _DynamicWinsockMethods.cs
- List.cs
- PointLightBase.cs
- Membership.cs
- DefaultAsyncDataDispatcher.cs
- PagedControl.cs
- ByeOperation11AsyncResult.cs
- PartitionResolver.cs
- BamlRecords.cs
- Deflater.cs
- EventSourceCreationData.cs
- ByteFacetDescriptionElement.cs
- PartialCachingControl.cs
- WindowsSlider.cs
- IntSecurity.cs
- CollectionsUtil.cs
- entityreference_tresulttype.cs
- XomlCompilerResults.cs
- FormatException.cs
- AppSettingsExpressionBuilder.cs
- QueryResponse.cs
- SmiEventStream.cs
- OleDbParameter.cs
- VBCodeProvider.cs
- StateFinalizationActivity.cs
- QueryOperationResponseOfT.cs
- DataSourceControl.cs
- NumericUpDownAcceleration.cs
- WindowProviderWrapper.cs
- ConstructorBuilder.cs
- ErrorInfoXmlDocument.cs
- HtmlContainerControl.cs
- InternalsVisibleToAttribute.cs
- RadioButtonPopupAdapter.cs
- WorkflowRuntimeService.cs
- BaseProcessProtocolHandler.cs
- CompilerGeneratedAttribute.cs
- VirtualizedContainerService.cs
- AmbientValueAttribute.cs
- WaveHeader.cs
- DefaultSection.cs
- StreamResourceInfo.cs
- Model3DCollection.cs
- RootProjectionNode.cs
- DataGridViewColumnTypeEditor.cs
- OperationGenerator.cs
- BitmapEffect.cs
- DoubleAnimationBase.cs
- HtmlInputRadioButton.cs
- DropShadowEffect.cs
- SerializationUtilities.cs
- Transform.cs
- ContentAlignmentEditor.cs
- StyleSelector.cs
- ClientConvert.cs
- KnownBoxes.cs
- OrderingExpression.cs
- UriSectionReader.cs
- UIPermission.cs
- PrintPreviewDialog.cs
- TextRangeAdaptor.cs
- SqlBulkCopy.cs
- AgileSafeNativeMemoryHandle.cs
- IdleTimeoutMonitor.cs
- HwndPanningFeedback.cs
- WorkflowRuntimeServiceElement.cs