Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CollectionTypeElement.cs
- PrefixQName.cs
- DetailsViewPagerRow.cs
- PowerStatus.cs
- mongolianshape.cs
- EventLogPermission.cs
- CollectionsUtil.cs
- DebugInfoExpression.cs
- EntityObject.cs
- ResponseBodyWriter.cs
- WebServiceFault.cs
- XpsFilter.cs
- EntityDesignerUtils.cs
- WebServiceMethodData.cs
- WebReferencesBuildProvider.cs
- invalidudtexception.cs
- IntSecurity.cs
- PageParserFilter.cs
- safemediahandle.cs
- CollectionDataContract.cs
- CommonDialog.cs
- DependencyObjectPropertyDescriptor.cs
- RawMouseInputReport.cs
- Visitors.cs
- IteratorFilter.cs
- ThaiBuddhistCalendar.cs
- MemberMemberBinding.cs
- Condition.cs
- NamedPipeTransportElement.cs
- FileClassifier.cs
- DBAsyncResult.cs
- XamlTypeWithExplicitNamespace.cs
- AuthorizationSection.cs
- ConstraintCollection.cs
- XmlNullResolver.cs
- MSAAEventDispatcher.cs
- StrokeFIndices.cs
- DeadCharTextComposition.cs
- ContentWrapperAttribute.cs
- FixedSOMContainer.cs
- ComboBox.cs
- SqlPersonalizationProvider.cs
- ServiceOperationWrapper.cs
- Border.cs
- DomainUpDown.cs
- SQLMoney.cs
- InputLanguage.cs
- LocalizationParserHooks.cs
- UpdatePanelTrigger.cs
- NumericExpr.cs
- RuntimeArgument.cs
- CustomLineCap.cs
- StickyNoteHelper.cs
- Context.cs
- StringUtil.cs
- EntityKeyElement.cs
- MeshGeometry3D.cs
- ObjectRef.cs
- BaseComponentEditor.cs
- DataSourceGroupCollection.cs
- TimeSpanValidator.cs
- WsiProfilesElement.cs
- ComEventsInfo.cs
- KeyInterop.cs
- DataGridViewCellPaintingEventArgs.cs
- FixedSOMImage.cs
- AssemblyName.cs
- TextViewDesigner.cs
- RemoteAsymmetricSignatureFormatter.cs
- DrawingImage.cs
- EncoderReplacementFallback.cs
- UnsettableComboBox.cs
- _TimerThread.cs
- NumberFunctions.cs
- DataGridViewColumnCollection.cs
- HostedElements.cs
- CroppedBitmap.cs
- IfAction.cs
- InvalidOleVariantTypeException.cs
- ListControl.cs
- ProgressBarHighlightConverter.cs
- IODescriptionAttribute.cs
- ACE.cs
- Funcletizer.cs
- FilterException.cs
- XmlSerializableReader.cs
- Primitive.cs
- PartialClassGenerationTaskInternal.cs
- UnsafeCollabNativeMethods.cs
- FusionWrap.cs
- PathFigureCollection.cs
- FrameworkReadOnlyPropertyMetadata.cs
- IntegerValidator.cs
- HtmlInputControl.cs
- Convert.cs
- PageSetupDialog.cs
- RemotingSurrogateSelector.cs
- StackBuilderSink.cs
- AppDomainProtocolHandler.cs
- MdImport.cs