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
- Model3D.cs
- AstTree.cs
- BaseProcessor.cs
- SynchronizationContext.cs
- XamlWriterExtensions.cs
- ExternalFile.cs
- ConstraintConverter.cs
- ControlDesigner.cs
- RMEnrollmentPage2.cs
- SqlStream.cs
- StrokeNodeData.cs
- CatalogPartCollection.cs
- AvTraceDetails.cs
- DataServiceOperationContext.cs
- ToolStripProgressBar.cs
- AccessorTable.cs
- TableCell.cs
- FormViewInsertEventArgs.cs
- CombinedTcpChannel.cs
- DateTimeConstantAttribute.cs
- Int32KeyFrameCollection.cs
- XmlSigningNodeWriter.cs
- PropertyIDSet.cs
- PackagePartCollection.cs
- XmlDataSource.cs
- OdbcErrorCollection.cs
- ScriptRegistrationManager.cs
- Transform3D.cs
- Operator.cs
- NamespaceEmitter.cs
- PropertySet.cs
- WebPartCancelEventArgs.cs
- WebEventTraceProvider.cs
- CollectionEditVerbManager.cs
- ObjectConverter.cs
- TextLine.cs
- SettingsSection.cs
- UdpAnnouncementEndpoint.cs
- SpotLight.cs
- validationstate.cs
- Point3DCollection.cs
- MULTI_QI.cs
- _ConnectionGroup.cs
- documentsequencetextpointer.cs
- Operand.cs
- OptimalBreakSession.cs
- Misc.cs
- AssemblyCache.cs
- DbBuffer.cs
- ServiceNameCollection.cs
- StrokeNodeOperations2.cs
- RectAnimationBase.cs
- ContentValidator.cs
- IteratorDescriptor.cs
- httpserverutility.cs
- FormViewPageEventArgs.cs
- ZipIOExtraField.cs
- AssociationEndMember.cs
- DependencyPropertyDescriptor.cs
- WaveHeader.cs
- HorizontalAlignConverter.cs
- SingleAnimation.cs
- MarkupCompilePass2.cs
- WebControlAdapter.cs
- PresentationTraceSources.cs
- mansign.cs
- PageContent.cs
- XPathMultyIterator.cs
- DefaultShape.cs
- HiddenFieldPageStatePersister.cs
- PaperSize.cs
- BitmapDecoder.cs
- SharedPerformanceCounter.cs
- DurableInstanceProvider.cs
- ApplicationGesture.cs
- EventSourceCreationData.cs
- Literal.cs
- MenuItem.cs
- HwndHostAutomationPeer.cs
- NativeMethods.cs
- CustomValidator.cs
- AlignmentYValidation.cs
- MethodExpr.cs
- CapabilitiesUse.cs
- MatrixTransform.cs
- InputReportEventArgs.cs
- EdmFunction.cs
- CompatibleIComparer.cs
- TextEditorTables.cs
- FirstMatchCodeGroup.cs
- PersistStreamTypeWrapper.cs
- ValidatedControlConverter.cs
- SequentialOutput.cs
- DiagnosticTraceSource.cs
- FieldCollectionEditor.cs
- TreeViewImageKeyConverter.cs
- SqlAliasesReferenced.cs
- LinkArea.cs
- PropertiesTab.cs
- Peer.cs