Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- CultureTable.cs
- BitmapImage.cs
- Inflater.cs
- SecurityKeyUsage.cs
- DispatcherTimer.cs
- _CacheStreams.cs
- Adorner.cs
- WebPartDisplayMode.cs
- Subordinate.cs
- IndexerNameAttribute.cs
- ProfilePropertySettingsCollection.cs
- EnvelopedPkcs7.cs
- UnaryOperationBinder.cs
- InsufficientMemoryException.cs
- TypeDelegator.cs
- CategoryAttribute.cs
- TextStore.cs
- ActiveDocumentEvent.cs
- ClientProxyGenerator.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- KeySplineConverter.cs
- HwndMouseInputProvider.cs
- SqlCaseSimplifier.cs
- ProfileServiceManager.cs
- NodeFunctions.cs
- CodeAssignStatement.cs
- DataGridViewDataErrorEventArgs.cs
- TypeGeneratedEventArgs.cs
- FloaterParaClient.cs
- Attributes.cs
- FocusChangedEventArgs.cs
- CodeAttributeArgument.cs
- LineInfo.cs
- ImageListImageEditor.cs
- ISFTagAndGuidCache.cs
- PageBreakRecord.cs
- WebPartEventArgs.cs
- StringSource.cs
- ChangeDirector.cs
- CellIdBoolean.cs
- ExternalFile.cs
- BrowserCapabilitiesFactory35.cs
- WebPartConnectionCollection.cs
- MobileControl.cs
- ScrollBar.cs
- ListViewSelectEventArgs.cs
- SoapRpcMethodAttribute.cs
- Number.cs
- _StreamFramer.cs
- MailWriter.cs
- XmlSchemaAny.cs
- Queue.cs
- TextHidden.cs
- DoubleAnimationUsingKeyFrames.cs
- _BasicClient.cs
- SqlGatherProducedAliases.cs
- BitmapPalette.cs
- KeyValueConfigurationElement.cs
- MDIControlStrip.cs
- WebServiceErrorEvent.cs
- NativeRightsManagementAPIsStructures.cs
- XmlILTrace.cs
- TabPage.cs
- _NetworkingPerfCounters.cs
- DbgUtil.cs
- IListConverters.cs
- ClientTargetSection.cs
- LocalizabilityAttribute.cs
- VBIdentifierName.cs
- ScriptControlManager.cs
- HMACSHA1.cs
- ThousandthOfEmRealPoints.cs
- Cursors.cs
- AuditLevel.cs
- Transform.cs
- VisualBasicReference.cs
- PrivacyNoticeBindingElement.cs
- StringHandle.cs
- RowUpdatingEventArgs.cs
- SqlStream.cs
- ClientSession.cs
- HttpCookie.cs
- ExceptionWrapper.cs
- CompositeFontInfo.cs
- PageRequestManager.cs
- SubclassTypeValidatorAttribute.cs
- Camera.cs
- RegionIterator.cs
- PresentationAppDomainManager.cs
- HighContrastHelper.cs
- LicFileLicenseProvider.cs
- MD5Cng.cs
- ContextMenuStripGroupCollection.cs
- PaperSize.cs
- SizeValueSerializer.cs
- Label.cs
- AnimationClockResource.cs
- RealizationDrawingContextWalker.cs
- InstanceCreationEditor.cs
- QueryableDataSourceHelper.cs