Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- MimeWriter.cs
- ObjectDataSourceSelectingEventArgs.cs
- ObjectViewEntityCollectionData.cs
- Debug.cs
- SqlDataSourceFilteringEventArgs.cs
- VisualStyleElement.cs
- ConfigurationManagerHelper.cs
- CleanUpVirtualizedItemEventArgs.cs
- OleDbInfoMessageEvent.cs
- SupportsPreviewControlAttribute.cs
- ToolStripSystemRenderer.cs
- Internal.cs
- AssociationType.cs
- ManualWorkflowSchedulerService.cs
- ToolStripLocationCancelEventArgs.cs
- WebCategoryAttribute.cs
- RawKeyboardInputReport.cs
- PreviewPageInfo.cs
- XmlNamespaceDeclarationsAttribute.cs
- ListViewInsertionMark.cs
- Int32Rect.cs
- XmlSchemaAnnotation.cs
- Quad.cs
- MultiPropertyDescriptorGridEntry.cs
- SafeNativeHandle.cs
- OperationSelectorBehavior.cs
- EasingKeyFrames.cs
- TextRangeSerialization.cs
- Menu.cs
- VectorAnimationBase.cs
- DefaultParameterValueAttribute.cs
- SystemException.cs
- RtfToken.cs
- TableChangeProcessor.cs
- InputProcessorProfilesLoader.cs
- EncoderFallback.cs
- CodeCatchClause.cs
- ConvertEvent.cs
- LinkLabelLinkClickedEvent.cs
- WebPartAddingEventArgs.cs
- TdsEnums.cs
- WaitHandleCannotBeOpenedException.cs
- TextChangedEventArgs.cs
- InProcStateClientManager.cs
- MeasureItemEvent.cs
- UpdateRecord.cs
- FilterableAttribute.cs
- DataGridViewTextBoxCell.cs
- DataPager.cs
- SqlSupersetValidator.cs
- _FtpControlStream.cs
- MapPathBasedVirtualPathProvider.cs
- ObjectDataSourceView.cs
- SHA256.cs
- AuthorizationRule.cs
- x509utils.cs
- DataSourceSelectArguments.cs
- Pair.cs
- SerializationSectionGroup.cs
- Rotation3DAnimation.cs
- ParagraphVisual.cs
- unsafeIndexingFilterStream.cs
- ListControlDataBindingHandler.cs
- WebRequest.cs
- DeclarationUpdate.cs
- TreeNodeEventArgs.cs
- TextRunCache.cs
- CallbackValidator.cs
- WorkflowApplicationException.cs
- AudioDeviceOut.cs
- PolygonHotSpot.cs
- DockAndAnchorLayout.cs
- OptimizerPatterns.cs
- XmlEnumAttribute.cs
- FrameDimension.cs
- CacheOutputQuery.cs
- GeometryHitTestResult.cs
- CursorConverter.cs
- PointValueSerializer.cs
- ConnectionConsumerAttribute.cs
- ScriptReferenceEventArgs.cs
- TypedDatasetGenerator.cs
- BrowserTree.cs
- TreeWalkHelper.cs
- TextChange.cs
- EntityDataSourceSelectingEventArgs.cs
- RtfToXamlLexer.cs
- ReceiveContent.cs
- Application.cs
- HostedElements.cs
- DataServiceRequest.cs
- WindowsPrincipal.cs
- TaskHelper.cs
- FontClient.cs
- ScrollProperties.cs
- ConnectionPointCookie.cs
- DebugHandleTracker.cs
- EncodingNLS.cs
- streamingZipPartStream.cs