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
- WindowsFormsSynchronizationContext.cs
- RestHandlerFactory.cs
- BindingContext.cs
- FunctionCommandText.cs
- FixUp.cs
- InternalConfigEventArgs.cs
- DataGridViewColumnConverter.cs
- BaseProcessor.cs
- CodeTypeReferenceCollection.cs
- BaseWebProxyFinder.cs
- BypassElementCollection.cs
- Point3DAnimation.cs
- SchemaEntity.cs
- PropertyGridEditorPart.cs
- SurrogateEncoder.cs
- ByteAnimationBase.cs
- ToolStripScrollButton.cs
- EdmMember.cs
- EntityDataSource.cs
- InfoCard.cs
- RawStylusInputCustomData.cs
- ColumnMapProcessor.cs
- ControlPaint.cs
- CalendarDesigner.cs
- QualifiedCellIdBoolean.cs
- MsmqIntegrationBindingElement.cs
- BamlRecordWriter.cs
- HttpResponseHeader.cs
- ErrorWrapper.cs
- DbDataSourceEnumerator.cs
- BindingsSection.cs
- EndpointDesigner.cs
- MarginCollapsingState.cs
- StorageScalarPropertyMapping.cs
- ToolboxItemWrapper.cs
- Point3DAnimation.cs
- DbConnectionFactory.cs
- Point4DValueSerializer.cs
- BitArray.cs
- SevenBitStream.cs
- ValidatingPropertiesEventArgs.cs
- PageAsyncTask.cs
- SqlMethodAttribute.cs
- Schema.cs
- WebBrowser.cs
- NumberFormatInfo.cs
- ValueSerializerAttribute.cs
- StorageFunctionMapping.cs
- LOSFormatter.cs
- XmlValidatingReaderImpl.cs
- TableLayoutStyle.cs
- ProviderSettingsCollection.cs
- DesigntimeLicenseContext.cs
- controlskin.cs
- XPathNavigatorKeyComparer.cs
- HtmlDocument.cs
- FunctionUpdateCommand.cs
- RuntimeConfigurationRecord.cs
- TransformerTypeCollection.cs
- BeginStoryboard.cs
- MouseEventArgs.cs
- Axis.cs
- SqlFileStream.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- RelationshipConstraintValidator.cs
- PackageDigitalSignatureManager.cs
- HashHelper.cs
- FileVersion.cs
- ToolStripDropDown.cs
- AuthorizationContext.cs
- OracleDataAdapter.cs
- PolicyLevel.cs
- X509SecurityToken.cs
- ExpandSegmentCollection.cs
- XmlFormatExtensionPointAttribute.cs
- EventProviderTraceListener.cs
- WorkflowMarkupSerializationProvider.cs
- SimpleBitVector32.cs
- StdValidatorsAndConverters.cs
- GPPOINTF.cs
- SystemKeyConverter.cs
- OleDbTransaction.cs
- Control.cs
- GeometryHitTestResult.cs
- SqlRowUpdatedEvent.cs
- Module.cs
- SmtpSection.cs
- dbdatarecord.cs
- Misc.cs
- KeyValuePairs.cs
- ResourcesBuildProvider.cs
- BoolLiteral.cs
- Visual3D.cs
- Convert.cs
- DirectoryInfo.cs
- RectangleConverter.cs
- HighlightVisual.cs
- SBCSCodePageEncoding.cs
- hresults.cs
- dbdatarecord.cs