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
- QueryContinueDragEvent.cs
- SectionXmlInfo.cs
- VersionUtil.cs
- PeerContact.cs
- RemoveStoryboard.cs
- Debug.cs
- RoleProviderPrincipal.cs
- UnmanagedHandle.cs
- CollaborationHelperFunctions.cs
- TemplatedMailWebEventProvider.cs
- ContentElement.cs
- HandlerBase.cs
- OrderedDictionary.cs
- Renderer.cs
- DataPagerFieldCollection.cs
- DataRelationCollection.cs
- WebResourceUtil.cs
- SelectionBorderGlyph.cs
- ObjectConverter.cs
- HtmlMeta.cs
- GraphicsState.cs
- IDataContractSurrogate.cs
- StorageMappingItemLoader.cs
- SoapExtensionStream.cs
- GenericEnumerator.cs
- GeometryGroup.cs
- DataRelationPropertyDescriptor.cs
- Point3DIndependentAnimationStorage.cs
- LiteralControl.cs
- MobileCapabilities.cs
- DeviceContexts.cs
- VisualStyleRenderer.cs
- CircleEase.cs
- RsaSecurityTokenAuthenticator.cs
- ParseNumbers.cs
- RegistryPermission.cs
- DefaultPrintController.cs
- ReaderContextStackData.cs
- SelectionProcessor.cs
- DisplayInformation.cs
- XmlArrayItemAttribute.cs
- KeyValueSerializer.cs
- TabControlDesigner.cs
- ReadOnlyCollection.cs
- ToolStripContainer.cs
- IERequestCache.cs
- FamilyMap.cs
- TimeSpanOrInfiniteValidator.cs
- SoapParser.cs
- Decimal.cs
- TextElementEditingBehaviorAttribute.cs
- ListDictionary.cs
- SQLInt16.cs
- Utilities.cs
- XmlLangPropertyAttribute.cs
- _AutoWebProxyScriptWrapper.cs
- MergablePropertyAttribute.cs
- FileLogRecord.cs
- _RequestCacheProtocol.cs
- DurableMessageDispatchInspector.cs
- WizardStepBase.cs
- SchemaSetCompiler.cs
- FrameworkElementFactory.cs
- Tracer.cs
- PropertyGridView.cs
- CompletedAsyncResult.cs
- ConfigurationCollectionAttribute.cs
- FamilyCollection.cs
- SerialPinChanges.cs
- EventMetadata.cs
- PanelStyle.cs
- SettingsAttributeDictionary.cs
- ComponentEditorForm.cs
- GroupBox.cs
- FormatConvertedBitmap.cs
- TextEffectResolver.cs
- TimeSpanOrInfiniteConverter.cs
- TextRangeBase.cs
- MultipleViewPattern.cs
- BoolLiteral.cs
- Rss20ItemFormatter.cs
- XslAstAnalyzer.cs
- ConditionedDesigner.cs
- AuthorizationSection.cs
- EndEvent.cs
- Substitution.cs
- Process.cs
- DeclaredTypeElement.cs
- Metafile.cs
- CellTreeNode.cs
- HttpException.cs
- MdImport.cs
- RadioButtonList.cs
- TypeSemantics.cs
- X509SecurityTokenAuthenticator.cs
- SyndicationFeedFormatter.cs
- NotConverter.cs
- AppDomainManager.cs
- TiffBitmapDecoder.cs
- CategoryList.cs