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
- TabControlCancelEvent.cs
- ConfigurationStrings.cs
- ProfileEventArgs.cs
- ControlBindingsCollection.cs
- Bookmark.cs
- MsmqAuthenticationMode.cs
- WsdlHelpGeneratorElement.cs
- RawTextInputReport.cs
- LinkDesigner.cs
- StreamWriter.cs
- UpdatePanelControlTrigger.cs
- DataGridItemCollection.cs
- RemotingSurrogateSelector.cs
- SubclassTypeValidator.cs
- SQLConvert.cs
- WebPartMinimizeVerb.cs
- PatternMatcher.cs
- PointAnimationClockResource.cs
- BindToObject.cs
- BamlRecordWriter.cs
- ListDataBindEventArgs.cs
- DateTimeFormatInfo.cs
- ProcessModule.cs
- SoapEnvelopeProcessingElement.cs
- DynamicPhysicalDiscoSearcher.cs
- SurrogateEncoder.cs
- OSFeature.cs
- CustomWebEventKey.cs
- RawStylusSystemGestureInputReport.cs
- DateTimeValueSerializer.cs
- ASCIIEncoding.cs
- Transform3DCollection.cs
- DataServiceCollectionOfT.cs
- ImageList.cs
- WebUtil.cs
- ConnectionManagementElement.cs
- QuaternionAnimationUsingKeyFrames.cs
- PrimaryKeyTypeConverter.cs
- PolygonHotSpot.cs
- Int32RectConverter.cs
- TraceHwndHost.cs
- EventSinkHelperWriter.cs
- UndoManager.cs
- filewebresponse.cs
- ExtensionCollection.cs
- SoapSchemaExporter.cs
- ReaderContextStackData.cs
- HtmlMeta.cs
- Stackframe.cs
- BitHelper.cs
- AxHost.cs
- IndexedEnumerable.cs
- ParenthesizePropertyNameAttribute.cs
- ChangeDirector.cs
- SHA256.cs
- OpenFileDialog.cs
- SoapFormatExtensions.cs
- MimeFormReflector.cs
- RadialGradientBrush.cs
- Oci.cs
- RegexCompiler.cs
- RequestNavigateEventArgs.cs
- Resources.Designer.cs
- ChangeDirector.cs
- OrderedParallelQuery.cs
- CatalogPartChrome.cs
- Polygon.cs
- AuthenticationServiceManager.cs
- GenericPrincipal.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- DataErrorValidationRule.cs
- CatalogZone.cs
- SqlCrossApplyToCrossJoin.cs
- DeclarationUpdate.cs
- FileLogRecordHeader.cs
- ComponentFactoryHelpers.cs
- shaperfactory.cs
- PolicyChain.cs
- ExtractedStateEntry.cs
- MemoryMappedFileSecurity.cs
- DetailsViewDeleteEventArgs.cs
- Monitor.cs
- ContentIterators.cs
- ComponentCollection.cs
- DataFormats.cs
- LogManagementAsyncResult.cs
- ObjectDataSourceMethodEditor.cs
- PathGeometry.cs
- StringAnimationUsingKeyFrames.cs
- PropertyDescriptorGridEntry.cs
- SafeMILHandle.cs
- Environment.cs
- OrthographicCamera.cs
- ExtentCqlBlock.cs
- DesignTimeXamlWriter.cs
- StrokeDescriptor.cs
- SelectionRange.cs
- XamlFilter.cs
- Perspective.cs
- SimplePropertyEntry.cs