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
- cache.cs
- TimelineGroup.cs
- COSERVERINFO.cs
- DynamicQueryableWrapper.cs
- RuleAttributes.cs
- HttpAsyncResult.cs
- EpmSourceTree.cs
- ObjectDataSource.cs
- Configuration.cs
- CodeAttributeDeclaration.cs
- WarningException.cs
- SqlConnectionPoolGroupProviderInfo.cs
- ProtectedConfiguration.cs
- Operators.cs
- PropertyKey.cs
- QilList.cs
- StringSource.cs
- CollectionConverter.cs
- Scheduling.cs
- Lasso.cs
- ColorKeyFrameCollection.cs
- FixedSOMSemanticBox.cs
- UIElementParaClient.cs
- ColorAnimation.cs
- SafeArrayTypeMismatchException.cs
- TransactionContext.cs
- XmlAnyElementAttribute.cs
- ColorConverter.cs
- SecurityUtils.cs
- Int64.cs
- RegisteredArrayDeclaration.cs
- CompilerError.cs
- XamlTreeBuilder.cs
- MD5.cs
- ListBindableAttribute.cs
- TemplateBindingExpression.cs
- Quad.cs
- IDictionary.cs
- FormClosedEvent.cs
- SystemTcpStatistics.cs
- MemberPath.cs
- ReferencedAssembly.cs
- MenuAutoFormat.cs
- TdsParserStaticMethods.cs
- RequestCacheManager.cs
- DynamicRenderer.cs
- DefaultTextStore.cs
- GACIdentityPermission.cs
- WebPart.cs
- Helper.cs
- OracleInternalConnection.cs
- KeyboardEventArgs.cs
- DispatchWrapper.cs
- TreeView.cs
- PrincipalPermission.cs
- StatusBar.cs
- FormViewDeletedEventArgs.cs
- TypeHelper.cs
- XmlUtilWriter.cs
- MsmqOutputChannel.cs
- URIFormatException.cs
- SkipStoryboardToFill.cs
- SqlTopReducer.cs
- CodeValidator.cs
- SystemWebSectionGroup.cs
- FixedSOMPageElement.cs
- SmtpClient.cs
- ILGen.cs
- BitSet.cs
- Rotation3D.cs
- DbConnectionPool.cs
- TableRow.cs
- ValidatingPropertiesEventArgs.cs
- panel.cs
- MtomMessageEncodingElement.cs
- MsmqBindingFilter.cs
- Encoding.cs
- SourceSwitch.cs
- WorkflowRuntime.cs
- ExtensionWindow.cs
- Graph.cs
- RangeBase.cs
- DataSourceCacheDurationConverter.cs
- StoryFragments.cs
- SecurityTokenValidationException.cs
- MDIControlStrip.cs
- CriticalExceptions.cs
- ListItemCollection.cs
- DebugView.cs
- Dynamic.cs
- SeekableReadStream.cs
- WsdlInspector.cs
- StylusShape.cs
- HeaderCollection.cs
- LoadItemsEventArgs.cs
- ToolStripOverflow.cs
- CategoriesDocumentFormatter.cs
- ServiceChannel.cs
- _ProxyRegBlob.cs
- RowToFieldTransformer.cs