Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / DeferredRunTextReference.cs / 1305600 / DeferredRunTextReference.cs
//---------------------------------------------------------------------------- // // File: DeferredRunTextReference.cs // // Copyright (C) Microsoft Corporation. All rights reserved. // // Description: Proxy object passed to the property system to delay load // TextProperty values. // //--------------------------------------------------------------------------- namespace System.Windows.Controls { using System.Windows.Documents; // Proxy object passed to the property system to delay load TextProperty // values. internal class DeferredRunTextReference : DeferredReference { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors internal DeferredRunTextReference(Run run) { _run = run; } #endregion Constructors //------------------------------------------------------ // // Internal Methods // //----------------------------------------------------- #region Internal Methods // Does the real work to calculate the current TextProperty value. internal override object GetValue(BaseValueSourceInternal valueSource) { return TextRangeBase.GetTextInternal(_run.ContentStart, _run.ContentEnd); } // Gets the type of the value it represents internal override Type GetValueType() { return typeof(string); } #endregion Internal Methods //------------------------------------------------------ // // Private Fields // //------------------------------------------------------ #region Private Fields // Run mapped to this object. private readonly Run _run; #endregion Private Fields } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // // File: DeferredRunTextReference.cs // // Copyright (C) Microsoft Corporation. All rights reserved. // // Description: Proxy object passed to the property system to delay load // TextProperty values. // //--------------------------------------------------------------------------- namespace System.Windows.Controls { using System.Windows.Documents; // Proxy object passed to the property system to delay load TextProperty // values. internal class DeferredRunTextReference : DeferredReference { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors internal DeferredRunTextReference(Run run) { _run = run; } #endregion Constructors //------------------------------------------------------ // // Internal Methods // //----------------------------------------------------- #region Internal Methods // Does the real work to calculate the current TextProperty value. internal override object GetValue(BaseValueSourceInternal valueSource) { return TextRangeBase.GetTextInternal(_run.ContentStart, _run.ContentEnd); } // Gets the type of the value it represents internal override Type GetValueType() { return typeof(string); } #endregion Internal Methods //------------------------------------------------------ // // Private Fields // //------------------------------------------------------ #region Private Fields // Run mapped to this object. private readonly Run _run; #endregion Private Fields } } // 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
- QueryExpr.cs
- TypedReference.cs
- DropShadowBitmapEffect.cs
- TrackingDataItemValue.cs
- GenericUriParser.cs
- ConfigXmlDocument.cs
- HtmlControlAdapter.cs
- DataGridViewAccessibleObject.cs
- OpenTypeCommon.cs
- SqlError.cs
- RawAppCommandInputReport.cs
- ApplicationException.cs
- SoapMessage.cs
- PolicyException.cs
- WeakReference.cs
- EpmSyndicationContentDeSerializer.cs
- Parser.cs
- ThumbAutomationPeer.cs
- DesignTimeParseData.cs
- AnonymousIdentificationSection.cs
- SortExpressionBuilder.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- BinaryFormatter.cs
- StreamWithDictionary.cs
- RefreshEventArgs.cs
- PopupEventArgs.cs
- EventMappingSettingsCollection.cs
- LazyLoadBehavior.cs
- MimeMultiPart.cs
- ToolStripDropDownDesigner.cs
- _SslStream.cs
- Int32CAMarshaler.cs
- PreviewPageInfo.cs
- SimpleType.cs
- OleDbWrapper.cs
- InvalidComObjectException.cs
- httpapplicationstate.cs
- InvokePatternIdentifiers.cs
- WebReferenceOptions.cs
- PageSettings.cs
- ListDataHelper.cs
- hwndwrapper.cs
- WebBrowsableAttribute.cs
- Codec.cs
- SearchForVirtualItemEventArgs.cs
- OdbcCommandBuilder.cs
- MsmqHostedTransportManager.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- MachinePropertyVariants.cs
- Delegate.cs
- CompilerWrapper.cs
- Lasso.cs
- TextSyndicationContentKindHelper.cs
- DocumentGridPage.cs
- MultiAsyncResult.cs
- TagPrefixAttribute.cs
- FixedSOMPageConstructor.cs
- DataServiceResponse.cs
- ZipIOExtraField.cs
- HttpApplication.cs
- DocumentScope.cs
- NetDataContractSerializer.cs
- TimerElapsedEvenArgs.cs
- RoutedEventValueSerializer.cs
- AppDomainFactory.cs
- CodePrimitiveExpression.cs
- NamespaceInfo.cs
- BufferBuilder.cs
- XPathSingletonIterator.cs
- ViewKeyConstraint.cs
- CorePropertiesFilter.cs
- FusionWrap.cs
- SolidBrush.cs
- SafeNativeMemoryHandle.cs
- SafeRightsManagementSessionHandle.cs
- QueryResults.cs
- Int32.cs
- mongolianshape.cs
- ComboBox.cs
- AssemblyEvidenceFactory.cs
- UnsafeNativeMethods.cs
- LogLogRecordEnumerator.cs
- DropTarget.cs
- XmlBindingWorker.cs
- WebPartTransformer.cs
- UnSafeCharBuffer.cs
- SettingsBase.cs
- SHA1.cs
- ProgressBar.cs
- _ServiceNameStore.cs
- DateTimeConstantAttribute.cs
- FilterableAttribute.cs
- X509IssuerSerialKeyIdentifierClause.cs
- GridPatternIdentifiers.cs
- MailAddressCollection.cs
- InputBinder.cs
- sapiproxy.cs
- Message.cs
- StylusPoint.cs
- PrintDocument.cs