Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- HyperlinkAutomationPeer.cs
- TransportElement.cs
- FlowDocumentPage.cs
- ProcessProtocolHandler.cs
- TreeNodeStyleCollection.cs
- ProjectionPlan.cs
- ToolStripContentPanelRenderEventArgs.cs
- EventLogStatus.cs
- IntPtr.cs
- ObjectAssociationEndMapping.cs
- QueryContinueDragEvent.cs
- SoapReflectionImporter.cs
- AppSettingsReader.cs
- OdbcEnvironmentHandle.cs
- BitmapSource.cs
- ComplexObject.cs
- AssemblyInfo.cs
- listitem.cs
- XsdDataContractImporter.cs
- WebReferencesBuildProvider.cs
- ThemeDirectoryCompiler.cs
- OverrideMode.cs
- FileClassifier.cs
- DataErrorValidationRule.cs
- OleDbParameter.cs
- HttpDictionary.cs
- UInt32Converter.cs
- EntityModelBuildProvider.cs
- XAMLParseException.cs
- OperationAbortedException.cs
- ScrollEvent.cs
- ReflectionServiceProvider.cs
- DataContract.cs
- VisualTransition.cs
- IteratorFilter.cs
- WebBrowserBase.cs
- CalendarDay.cs
- Color.cs
- GroupStyle.cs
- LOSFormatter.cs
- RenameRuleObjectDialog.cs
- ObjectStorage.cs
- BitmapImage.cs
- DataGridViewImageCell.cs
- CookielessHelper.cs
- BamlReader.cs
- TableLayoutSettingsTypeConverter.cs
- ResolveNameEventArgs.cs
- Int32RectConverter.cs
- HashHelpers.cs
- JapaneseLunisolarCalendar.cs
- IImplicitResourceProvider.cs
- ParallelTimeline.cs
- ResourceWriter.cs
- _Connection.cs
- MediaContext.cs
- FilterEventArgs.cs
- BevelBitmapEffect.cs
- OLEDB_Enum.cs
- CalendarTable.cs
- InitializerFacet.cs
- CompareInfo.cs
- CodeGotoStatement.cs
- SoapFault.cs
- GeometryGroup.cs
- FloaterBaseParaClient.cs
- DataGridViewIntLinkedList.cs
- AdjustableArrowCap.cs
- CodeStatement.cs
- SpeakInfo.cs
- DataGridViewSelectedCellCollection.cs
- InkCanvas.cs
- XamlPathDataSerializer.cs
- Attribute.cs
- CurrencyWrapper.cs
- LinearKeyFrames.cs
- HostedTcpTransportManager.cs
- UIElementPropertyUndoUnit.cs
- KeyProperty.cs
- ProcessManager.cs
- BindingElement.cs
- DataGridLength.cs
- BCLDebug.cs
- SelectionManager.cs
- HtmlInputButton.cs
- HttpResponseHeader.cs
- LineServicesCallbacks.cs
- QilGeneratorEnv.cs
- RadialGradientBrush.cs
- InputManager.cs
- Semaphore.cs
- ImageMetadata.cs
- CultureSpecificStringDictionary.cs
- ToolStripRenderer.cs
- KeyedHashAlgorithm.cs
- DurableServiceAttribute.cs
- ListManagerBindingsCollection.cs
- HandlerMappingMemo.cs
- HostSecurityManager.cs
- HwndHost.cs