Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / DeferredTextReference.cs / 1305600 / 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) { string s = TextRangeBase.GetTextInternal(_textContainer.Start, _textContainer.End); TextBox tb = _textContainer.Parent as TextBox; if (tb != null) { tb.OnDeferredTextReferenceResolved(this, s); } return s; } // 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
- SystemIPv6InterfaceProperties.cs
- sitestring.cs
- View.cs
- SoapReflector.cs
- TimeSpanFormat.cs
- SpecularMaterial.cs
- Transform3DCollection.cs
- SqlCacheDependencySection.cs
- recordstatefactory.cs
- VBIdentifierDesigner.xaml.cs
- DrawingState.cs
- CompositeScriptReferenceEventArgs.cs
- UnionCodeGroup.cs
- CompiledQuery.cs
- ObjectCloneHelper.cs
- MetadataCache.cs
- DebugTrace.cs
- VisualStates.cs
- SoapInteropTypes.cs
- ScopelessEnumAttribute.cs
- XmlConverter.cs
- Substitution.cs
- FileLevelControlBuilderAttribute.cs
- ExitEventArgs.cs
- FontFamily.cs
- UrlPath.cs
- StrongNameMembershipCondition.cs
- RoutingConfiguration.cs
- RenderData.cs
- StorageBasedPackageProperties.cs
- counter.cs
- AssertSection.cs
- XmlAutoDetectWriter.cs
- SQLStringStorage.cs
- PrivilegedConfigurationManager.cs
- CheckBox.cs
- RewritingValidator.cs
- MultiSelectRootGridEntry.cs
- AspNetRouteServiceHttpHandler.cs
- SynchronizationLockException.cs
- OutputCacheModule.cs
- DbConnectionInternal.cs
- ObjectCacheHost.cs
- Composition.cs
- HashSetDebugView.cs
- InputReferenceExpression.cs
- IApplicationTrustManager.cs
- SqlTransaction.cs
- CodePropertyReferenceExpression.cs
- OutputScope.cs
- XmlSecureResolver.cs
- Label.cs
- CustomAttribute.cs
- _IPv4Address.cs
- MethodCallConverter.cs
- OutputCacheModule.cs
- MexTcpBindingCollectionElement.cs
- CodeAttributeDeclaration.cs
- HScrollProperties.cs
- XmlnsPrefixAttribute.cs
- DataGridViewUtilities.cs
- OutputCacheSettings.cs
- ImageListStreamer.cs
- HttpCachePolicyElement.cs
- EntitySetRetriever.cs
- SendDesigner.xaml.cs
- HGlobalSafeHandle.cs
- ProcessHostMapPath.cs
- RelationHandler.cs
- coordinatorscratchpad.cs
- TimeStampChecker.cs
- DynamicPropertyHolder.cs
- HttpCookiesSection.cs
- OutputCacheProfile.cs
- ListDictionaryInternal.cs
- TreeViewEvent.cs
- MessageVersionConverter.cs
- BrushMappingModeValidation.cs
- MaterialCollection.cs
- safemediahandle.cs
- ObjectSet.cs
- EntityDataSourceDataSelection.cs
- OdbcPermission.cs
- GridViewDeletedEventArgs.cs
- ButtonBaseAdapter.cs
- SQLGuidStorage.cs
- SafeNativeMethods.cs
- DragCompletedEventArgs.cs
- SoapCodeExporter.cs
- Stream.cs
- WebControlParameterProxy.cs
- GlobalizationSection.cs
- Message.cs
- HttpRawResponse.cs
- EdmMember.cs
- SystemDropShadowChrome.cs
- HtmlUtf8RawTextWriter.cs
- Attributes.cs
- SecurityProtocolCorrelationState.cs
- HttpHandler.cs