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
- CompilerScopeManager.cs
- StringWriter.cs
- LinqDataSourceStatusEventArgs.cs
- Sentence.cs
- ClientApiGenerator.cs
- Vector3DCollectionConverter.cs
- BitStack.cs
- MarkupExtensionReturnTypeAttribute.cs
- EditorPartChrome.cs
- StyleBamlRecordReader.cs
- GroupBox.cs
- SqlFormatter.cs
- GroupBoxAutomationPeer.cs
- Geometry3D.cs
- ConnectionStringsSection.cs
- ScrollItemProviderWrapper.cs
- DeobfuscatingStream.cs
- AppSettingsReader.cs
- glyphs.cs
- ArrayExtension.cs
- SchemaReference.cs
- RenderData.cs
- CaseExpr.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- Literal.cs
- List.cs
- CompiledIdentityConstraint.cs
- IxmlLineInfo.cs
- ApplicationManager.cs
- MsmqActivation.cs
- ADMembershipProvider.cs
- TypeRefElement.cs
- BitmapEffectInput.cs
- SqlServices.cs
- AdapterDictionary.cs
- TypeDependencyAttribute.cs
- LinearQuaternionKeyFrame.cs
- Int32AnimationBase.cs
- XmlSerializer.cs
- CultureSpecificStringDictionary.cs
- CallbackValidator.cs
- PageContentAsyncResult.cs
- CacheMemory.cs
- ForEachAction.cs
- XmlElementList.cs
- ClientTarget.cs
- CursorInteropHelper.cs
- Solver.cs
- GacUtil.cs
- XmlSchemaValidator.cs
- TextBox.cs
- WindowsMenu.cs
- ApplicationId.cs
- ProtectedProviderSettings.cs
- ISO2022Encoding.cs
- TdsParameterSetter.cs
- CodeExpressionCollection.cs
- ObjectTypeMapping.cs
- Literal.cs
- InvalidateEvent.cs
- DataSysAttribute.cs
- DataGridViewComboBoxEditingControl.cs
- TextEditorThreadLocalStore.cs
- WaitForChangedResult.cs
- COM2Properties.cs
- EntitySqlException.cs
- backend.cs
- ellipse.cs
- SqlRowUpdatedEvent.cs
- ReadOnlyCollectionBase.cs
- SimpleWebHandlerParser.cs
- StringKeyFrameCollection.cs
- DataServiceResponse.cs
- assemblycache.cs
- ScrollEvent.cs
- MultiPartWriter.cs
- BitmapEffectDrawingContextState.cs
- BitmapMetadataBlob.cs
- DropDownButton.cs
- ContainerActivationHelper.cs
- UIElementParagraph.cs
- DiagnosticsConfiguration.cs
- CodeObjectCreateExpression.cs
- HttpListenerPrefixCollection.cs
- CodeAccessPermission.cs
- DomainConstraint.cs
- WeakRefEnumerator.cs
- KeyValueInternalCollection.cs
- MulticastIPAddressInformationCollection.cs
- RTTypeWrapper.cs
- ChtmlTextWriter.cs
- FaultContractAttribute.cs
- BinaryMessageFormatter.cs
- CollectionDataContractAttribute.cs
- Label.cs
- Unit.cs
- HtmlForm.cs
- DataMemberConverter.cs
- SqlTopReducer.cs
- GrammarBuilderWildcard.cs