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
- SqlCachedBuffer.cs
- NameValueSectionHandler.cs
- BuildProvider.cs
- FormattedText.cs
- FileSecurity.cs
- LineSegment.cs
- MethodImplAttribute.cs
- ComplexBindingPropertiesAttribute.cs
- ListItemCollection.cs
- Utils.cs
- SectionInformation.cs
- PrincipalPermissionMode.cs
- Decoder.cs
- WinFormsComponentEditor.cs
- ScrollItemPatternIdentifiers.cs
- AsymmetricKeyExchangeDeformatter.cs
- Transform.cs
- XamlFilter.cs
- FlowDocumentReader.cs
- DeviceSpecific.cs
- XmlSchemaParticle.cs
- InternalConfigEventArgs.cs
- ColumnClickEvent.cs
- Message.cs
- DocumentViewerBaseAutomationPeer.cs
- SHA384CryptoServiceProvider.cs
- CompletedAsyncResult.cs
- WebPartCatalogCloseVerb.cs
- FusionWrap.cs
- DictationGrammar.cs
- XamlFrame.cs
- LinkLabel.cs
- EntityTransaction.cs
- LinqDataSourceDeleteEventArgs.cs
- ObjectDataSourceWizardForm.cs
- Compiler.cs
- FontNamesConverter.cs
- CheckedListBox.cs
- SessionStateUtil.cs
- Span.cs
- DialogWindow.cs
- MethodCallConverter.cs
- XmlChildNodes.cs
- WpfXamlMember.cs
- MatrixTransform.cs
- DbModificationCommandTree.cs
- ParserExtension.cs
- ValueHandle.cs
- WindowsRichEdit.cs
- FixedSOMTextRun.cs
- WebSysDescriptionAttribute.cs
- AttributeUsageAttribute.cs
- propertyentry.cs
- M3DUtil.cs
- ContentDisposition.cs
- Helper.cs
- TextTrailingCharacterEllipsis.cs
- Popup.cs
- PanelStyle.cs
- WindowsFormsSynchronizationContext.cs
- ReferencedType.cs
- RoleManagerModule.cs
- AdRotator.cs
- TextTreeNode.cs
- autovalidator.cs
- Vector3DCollectionValueSerializer.cs
- AdapterDictionary.cs
- DefaultPropertyAttribute.cs
- SelfSignedCertificate.cs
- XslVisitor.cs
- XmlSecureResolver.cs
- Decorator.cs
- StatusBarPanelClickEvent.cs
- SoapHelper.cs
- DesignTimeVisibleAttribute.cs
- XMLSyntaxException.cs
- X509ThumbprintKeyIdentifierClause.cs
- ValidationPropertyAttribute.cs
- TextSerializer.cs
- EncodingInfo.cs
- TraceSection.cs
- SecondaryIndexDefinition.cs
- CallContext.cs
- PreloadedPackages.cs
- SqlAggregateChecker.cs
- URLMembershipCondition.cs
- MethodBuilder.cs
- XmlFormatReaderGenerator.cs
- AnnouncementEndpointElement.cs
- ItemCollection.cs
- MdiWindowListItemConverter.cs
- CodeSnippetCompileUnit.cs
- LinkUtilities.cs
- Debugger.cs
- DesignerSerializerAttribute.cs
- ToolStripGrip.cs
- CodeGenHelper.cs
- LineSegment.cs
- SID.cs
- ImageInfo.cs