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
- NotificationContext.cs
- ImageFormat.cs
- InternalDuplexChannelFactory.cs
- SqlProcedureAttribute.cs
- RuntimeConfigurationRecord.cs
- DocumentOrderQuery.cs
- BulletedListEventArgs.cs
- Rect3DValueSerializer.cs
- CodeTypeMemberCollection.cs
- TraceInternal.cs
- XComponentModel.cs
- AutomationElementCollection.cs
- ParserHooks.cs
- DPTypeDescriptorContext.cs
- CanExecuteRoutedEventArgs.cs
- IPAddress.cs
- CqlLexerHelpers.cs
- LayoutUtils.cs
- SqlCommandBuilder.cs
- OrderedDictionaryStateHelper.cs
- TabControl.cs
- StringResourceManager.cs
- DecoderFallback.cs
- EventLogTraceListener.cs
- XmlSchemaIdentityConstraint.cs
- BackStopAuthenticationModule.cs
- InfiniteTimeSpanConverter.cs
- MessageHeaderAttribute.cs
- XsltCompileContext.cs
- X509Certificate.cs
- ServiceNameElement.cs
- Vector3DCollectionValueSerializer.cs
- PropertyToken.cs
- HwndPanningFeedback.cs
- Range.cs
- ReliableChannelBinder.cs
- HttpStreamXmlDictionaryWriter.cs
- OwnerDrawPropertyBag.cs
- EventLogPermission.cs
- TypeUsage.cs
- ApplicationActivator.cs
- RemoteHelper.cs
- TargetException.cs
- TailCallAnalyzer.cs
- RefExpr.cs
- TableLayoutPanel.cs
- ReflectEventDescriptor.cs
- TypeConverterHelper.cs
- DrawingBrush.cs
- Emitter.cs
- DocumentXmlWriter.cs
- StringCollection.cs
- UserNameSecurityTokenAuthenticator.cs
- ObjectManager.cs
- TextProperties.cs
- Transform3D.cs
- BlockUIContainer.cs
- _HelperAsyncResults.cs
- FactoryGenerator.cs
- TextEditorMouse.cs
- DataGridViewRowStateChangedEventArgs.cs
- XPathSelfQuery.cs
- WebPartChrome.cs
- ParameterElementCollection.cs
- Vector.cs
- DataSourceCacheDurationConverter.cs
- QuaternionRotation3D.cs
- DateTimeFormat.cs
- ExtensionFile.cs
- CompareValidator.cs
- WebRequestModulesSection.cs
- BamlCollectionHolder.cs
- XmlAggregates.cs
- DynamicExpression.cs
- QilPatternFactory.cs
- Style.cs
- ServiceDiscoveryBehavior.cs
- BypassElement.cs
- ParserOptions.cs
- NamedPermissionSet.cs
- SystemFonts.cs
- ThrowHelper.cs
- PolicyException.cs
- SpeakInfo.cs
- SafeProcessHandle.cs
- LoadedOrUnloadedOperation.cs
- GlyphRun.cs
- MultiPageTextView.cs
- DataServiceKeyAttribute.cs
- Executor.cs
- SqlTopReducer.cs
- ValidatorUtils.cs
- DataContractSerializerElement.cs
- HttpResponseHeader.cs
- BlobPersonalizationState.cs
- SafeCertificateStore.cs
- InternalConfigRoot.cs
- KernelTypeValidation.cs
- WebServiceClientProxyGenerator.cs
- ConfigurationSchemaErrors.cs