Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Framework / System / Windows / Controls / DeferredTextReference.cs / 1 / DeferredTextReference.cs
//---------------------------------------------------------------------------- // // File: DeferredTextReference.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 DeferredTextReference : DeferredReference { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors internal DeferredTextReference(ITextContainer textContainer) { _textContainer = textContainer; } #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(_textContainer.Start, _textContainer.End); } // Gets the type of the value it represents internal override Type GetValueType() { return typeof(string); } #endregion Internal Methods //------------------------------------------------------ // // Private Fields // //------------------------------------------------------ #region Private Fields // TextContainer mapped to this object. private readonly ITextContainer _textContainer; #endregion Private Fields } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // // File: DeferredTextReference.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 DeferredTextReference : DeferredReference { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors internal DeferredTextReference(ITextContainer textContainer) { _textContainer = textContainer; } #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(_textContainer.Start, _textContainer.End); } // Gets the type of the value it represents internal override Type GetValueType() { return typeof(string); } #endregion Internal Methods //------------------------------------------------------ // // Private Fields // //------------------------------------------------------ #region Private Fields // TextContainer mapped to this object. private readonly ITextContainer _textContainer; #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
- DrawingContextDrawingContextWalker.cs
- CompositeClientFormatter.cs
- PersonalizationState.cs
- WaitHandleCannotBeOpenedException.cs
- X509CertificateCollection.cs
- DelegatedStream.cs
- GeneralTransform3DGroup.cs
- WebPartDescriptionCollection.cs
- SecurityHelper.cs
- PeerTransportListenAddressConverter.cs
- ExtendedTransformFactory.cs
- XamlClipboardData.cs
- DataError.cs
- LayoutSettings.cs
- LoginName.cs
- OptimizedTemplateContentHelper.cs
- WindowsFormsSectionHandler.cs
- RelationshipConverter.cs
- VersionedStream.cs
- TabItemWrapperAutomationPeer.cs
- MobileUITypeEditor.cs
- TextLineResult.cs
- XmlSchemaComplexType.cs
- Predicate.cs
- HttpServerUtilityBase.cs
- DataContractSerializer.cs
- DefaultHttpHandler.cs
- FactoryId.cs
- WebPartHeaderCloseVerb.cs
- XmlNodeList.cs
- LicenseException.cs
- safex509handles.cs
- XPathDescendantIterator.cs
- TextProviderWrapper.cs
- CodeDomSerializationProvider.cs
- StreamGeometry.cs
- QilBinary.cs
- RawTextInputReport.cs
- Crypto.cs
- CodeDirectionExpression.cs
- RpcResponse.cs
- ColorMatrix.cs
- SourceItem.cs
- ScalarConstant.cs
- ObjectNotFoundException.cs
- Compiler.cs
- RetrieveVirtualItemEventArgs.cs
- XmlName.cs
- ConfigurationSectionGroup.cs
- HttpListenerException.cs
- FamilyTypeface.cs
- TemplateXamlParser.cs
- StyleCollection.cs
- DataViewListener.cs
- TdsParser.cs
- RawTextInputReport.cs
- DbSetClause.cs
- ComboBoxAutomationPeer.cs
- CaretElement.cs
- NameValuePermission.cs
- LabelInfo.cs
- OpenTypeLayout.cs
- PropertyEntry.cs
- AnyReturnReader.cs
- Site.cs
- ProviderConnectionPoint.cs
- MDIWindowDialog.cs
- ContentPresenter.cs
- GetPageCompletedEventArgs.cs
- ObjectPropertyMapping.cs
- DialogResultConverter.cs
- CodeNamespaceCollection.cs
- NameObjectCollectionBase.cs
- DictionaryContent.cs
- Visual3D.cs
- RegexBoyerMoore.cs
- SafeTokenHandle.cs
- ToolZone.cs
- InstalledFontCollection.cs
- WebPartPersonalization.cs
- EpmHelper.cs
- ScrollEvent.cs
- BinaryFormatterSinks.cs
- ButtonBaseAutomationPeer.cs
- WrapperEqualityComparer.cs
- ComponentChangingEvent.cs
- Version.cs
- SynchronizationFilter.cs
- CodeSpit.cs
- StateMachine.cs
- DbExpressionBuilder.cs
- MenuItem.cs
- XmlSchemas.cs
- IPAddress.cs
- EventArgs.cs
- TextDecorationCollectionConverter.cs
- ViewCellSlot.cs
- EvidenceBase.cs
- KeyPullup.cs
- DataGridViewMethods.cs