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
- Root.cs
- Internal.cs
- DataGridViewTextBoxEditingControl.cs
- DriveInfo.cs
- ParameterInfo.cs
- XmlFormatWriterGenerator.cs
- MsmqHostedTransportManager.cs
- BaseTemplateParser.cs
- ThemeableAttribute.cs
- VectorCollectionValueSerializer.cs
- ProxyGenerator.cs
- DataViewSettingCollection.cs
- Parallel.cs
- Resources.Designer.cs
- CodeExporter.cs
- ErrorTableItemStyle.cs
- DependencyProperty.cs
- UriExt.cs
- MethodBody.cs
- ObjectStateFormatter.cs
- PackageRelationship.cs
- GradientBrush.cs
- DocumentSequence.cs
- GPPOINTF.cs
- InstanceDescriptor.cs
- EntityContainer.cs
- ObjectDataProvider.cs
- SerialPinChanges.cs
- _BaseOverlappedAsyncResult.cs
- HorizontalAlignConverter.cs
- OleStrCAMarshaler.cs
- WebConfigurationHost.cs
- Padding.cs
- DesignTimeXamlWriter.cs
- XmlSchemaAttributeGroupRef.cs
- XPathNodeIterator.cs
- MemoryStream.cs
- WebReferencesBuildProvider.cs
- RawTextInputReport.cs
- CacheDict.cs
- SqlGatherProducedAliases.cs
- MultiPageTextView.cs
- XmlUtf8RawTextWriter.cs
- ObjectToModelValueConverter.cs
- CmsUtils.cs
- ContractValidationHelper.cs
- ArgumentOutOfRangeException.cs
- ResourceCategoryAttribute.cs
- FormatSelectingMessageInspector.cs
- Ref.cs
- XmlUtilWriter.cs
- SecurityTokenProviderContainer.cs
- PropertyCollection.cs
- XmlDataCollection.cs
- KnownIds.cs
- securitycriticaldataClass.cs
- XmlObjectSerializerReadContextComplex.cs
- HttpContextServiceHost.cs
- PictureBox.cs
- EmptyEnumerable.cs
- Speller.cs
- QualifiedCellIdBoolean.cs
- CqlLexerHelpers.cs
- BitmapSource.cs
- IDReferencePropertyAttribute.cs
- SystemParameters.cs
- ObjectNavigationPropertyMapping.cs
- SiteMapNode.cs
- ConfigXmlElement.cs
- RoleManagerModule.cs
- WindowsGraphicsWrapper.cs
- DataGridViewColumnTypePicker.cs
- GPPOINT.cs
- MasterPageBuildProvider.cs
- DataServiceProviderMethods.cs
- Function.cs
- DisplayNameAttribute.cs
- Wizard.cs
- AddressAccessDeniedException.cs
- xmlformatgeneratorstatics.cs
- ReadOnlyHierarchicalDataSourceView.cs
- DrawingContext.cs
- TypeDelegator.cs
- DockingAttribute.cs
- ResourceWriter.cs
- CodeStatement.cs
- BreakRecordTable.cs
- DiagnosticsConfiguration.cs
- PagerSettings.cs
- ResourceReader.cs
- ChangeNode.cs
- AvTrace.cs
- XmlObjectSerializerContext.cs
- AppDomainProtocolHandler.cs
- RoutedCommand.cs
- UniqueIdentifierService.cs
- InheritanceService.cs
- UntrustedRecipientException.cs
- SelectionList.cs
- ValidationErrorEventArgs.cs