Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- XmlArrayAttribute.cs
- FamilyMapCollection.cs
- As.cs
- UserCancellationException.cs
- DBPropSet.cs
- DateTimeConstantAttribute.cs
- ToolbarAUtomationPeer.cs
- FileIOPermission.cs
- Attributes.cs
- ParameterModifier.cs
- Msmq4PoisonHandler.cs
- AnnotationDocumentPaginator.cs
- ObservableCollection.cs
- SID.cs
- PagesSection.cs
- SignatureGenerator.cs
- RC2CryptoServiceProvider.cs
- XmlSchemaAttributeGroup.cs
- AllMembershipCondition.cs
- Double.cs
- XmlTextReaderImplHelpers.cs
- GlyphRunDrawing.cs
- WebServiceBindingAttribute.cs
- AutoResetEvent.cs
- Object.cs
- DataGridViewDataErrorEventArgs.cs
- BrowserCapabilitiesFactoryBase.cs
- ParentUndoUnit.cs
- SqlFlattener.cs
- StringValidatorAttribute.cs
- ObjectView.cs
- WebPartDescription.cs
- Root.cs
- DbParameterCollection.cs
- Models.cs
- BitmapFrameEncode.cs
- X509Extension.cs
- TextDecorationUnitValidation.cs
- DBParameter.cs
- SmtpNetworkElement.cs
- SoapSchemaExporter.cs
- DtdParser.cs
- BrowsableAttribute.cs
- storepermission.cs
- X509AudioLogo.cs
- WebPartRestoreVerb.cs
- WebReferencesBuildProvider.cs
- BuilderPropertyEntry.cs
- CodeMethodInvokeExpression.cs
- SchemaDeclBase.cs
- ListBox.cs
- OdbcParameter.cs
- CatchDesigner.xaml.cs
- AttachedPropertyMethodSelector.cs
- DesignerDataSourceView.cs
- BitmapEffectRenderDataResource.cs
- RenderCapability.cs
- Exceptions.cs
- AppSettingsExpressionBuilder.cs
- RuleProcessor.cs
- ItemAutomationPeer.cs
- FileDialogCustomPlace.cs
- _ListenerAsyncResult.cs
- ConfigurationValue.cs
- HostSecurityManager.cs
- QueueProcessor.cs
- WorkflowInlining.cs
- RegistrySecurity.cs
- StatusInfoItem.cs
- MethodAccessException.cs
- SqlParameter.cs
- DependencyPropertyConverter.cs
- RenderDataDrawingContext.cs
- PrintPreviewControl.cs
- UrlMapping.cs
- ConfigurationManagerInternalFactory.cs
- SQLDateTimeStorage.cs
- WebControlAdapter.cs
- BinaryWriter.cs
- TargetInvocationException.cs
- DatatypeImplementation.cs
- DropDownList.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- DataViewSettingCollection.cs
- SelectionGlyphBase.cs
- RoleGroupCollection.cs
- ObjRef.cs
- ResXResourceReader.cs
- BamlStream.cs
- CounterCreationDataCollection.cs
- HiddenFieldPageStatePersister.cs
- RectAnimation.cs
- HelloOperationCD1AsyncResult.cs
- Hyperlink.cs
- MultiViewDesigner.cs
- XmlAnyElementAttribute.cs
- AutomationAttributeInfo.cs
- DataTemplateKey.cs
- UnitySerializationHolder.cs
- AdRotator.cs