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
- SystemWebExtensionsSectionGroup.cs
- ComponentRenameEvent.cs
- WebEncodingValidator.cs
- DataSpaceManager.cs
- TTSEngineProxy.cs
- FormsAuthentication.cs
- ImageListUtils.cs
- WsatProxy.cs
- WindowsGraphics2.cs
- Size.cs
- StringValidatorAttribute.cs
- LoginCancelEventArgs.cs
- ClientFactory.cs
- MouseButton.cs
- CompilerGlobalScopeAttribute.cs
- OperationResponse.cs
- TemplateBindingExtensionConverter.cs
- GlyphTypeface.cs
- ServiceReference.cs
- ApplicationException.cs
- WindowsAuthenticationEventArgs.cs
- _HelperAsyncResults.cs
- OracleRowUpdatedEventArgs.cs
- InputLangChangeRequestEvent.cs
- DesignerAdapterAttribute.cs
- OperatingSystemVersionCheck.cs
- Errors.cs
- ResolveMatchesCD1.cs
- Keyboard.cs
- SecureStringHasher.cs
- TabPanel.cs
- Source.cs
- TemplateParser.cs
- DateTimeParse.cs
- ApplicationDirectory.cs
- PrePrepareMethodAttribute.cs
- IndexerNameAttribute.cs
- InternalBufferOverflowException.cs
- ListViewInsertedEventArgs.cs
- SqlMethodAttribute.cs
- SQLGuid.cs
- RequestQueryParser.cs
- DbConnectionPoolIdentity.cs
- DataServiceException.cs
- PermissionAttributes.cs
- AutomationProperty.cs
- UnmanagedHandle.cs
- FullTrustAssemblyCollection.cs
- HttpListenerRequestUriBuilder.cs
- ControlValuePropertyAttribute.cs
- RegistryConfigurationProvider.cs
- TextPenaltyModule.cs
- FieldMetadata.cs
- unitconverter.cs
- CacheMemory.cs
- TrackingParticipant.cs
- FieldToken.cs
- XmlnsPrefixAttribute.cs
- CompensationHandlingFilter.cs
- HttpClientCertificate.cs
- _CommandStream.cs
- CategoryAttribute.cs
- ResumeStoryboard.cs
- HyperLinkField.cs
- CompilerError.cs
- MulticastDelegate.cs
- TreeView.cs
- Transactions.cs
- CellCreator.cs
- XPathBinder.cs
- TimeSpan.cs
- RecognizerBase.cs
- GridViewUpdateEventArgs.cs
- Stacktrace.cs
- SourceElementsCollection.cs
- XmlMemberMapping.cs
- FileNotFoundException.cs
- DataGridViewCellStateChangedEventArgs.cs
- HitTestParameters3D.cs
- SafeReversePInvokeHandle.cs
- ComponentChangingEvent.cs
- TextSegment.cs
- FixedPage.cs
- XslTransform.cs
- ColumnTypeConverter.cs
- QuaternionAnimation.cs
- DataFieldEditor.cs
- GridViewDeleteEventArgs.cs
- SqlStream.cs
- ContentTextAutomationPeer.cs
- BaseDataList.cs
- Window.cs
- GridLengthConverter.cs
- DetailsViewPageEventArgs.cs
- SystemIcmpV6Statistics.cs
- SecurityIdentifierElement.cs
- XPathNodePointer.cs
- TeredoHelper.cs
- Int64Storage.cs
- Inline.cs