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
- SiteMapPath.cs
- TextEditorContextMenu.cs
- ConfigUtil.cs
- BulletedListDesigner.cs
- QilXmlWriter.cs
- ComEventsMethod.cs
- ConcatQueryOperator.cs
- CodeMemberProperty.cs
- Int32AnimationBase.cs
- unsafeIndexingFilterStream.cs
- XmlSchemaSimpleTypeList.cs
- __TransparentProxy.cs
- DomNameTable.cs
- Size3DConverter.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- ResourceWriter.cs
- SiteMap.cs
- ResourceWriter.cs
- DateTimeFormat.cs
- DataObject.cs
- SecurityManager.cs
- BindableTemplateBuilder.cs
- EventLogEntry.cs
- DataControlHelper.cs
- SemaphoreSecurity.cs
- BaseTransportHeaders.cs
- NotifyIcon.cs
- EllipticalNodeOperations.cs
- altserialization.cs
- InteropExecutor.cs
- StaticDataManager.cs
- Number.cs
- Matrix3DConverter.cs
- FormatVersion.cs
- FaultCallbackWrapper.cs
- StrokeNodeOperations2.cs
- UniqueIdentifierService.cs
- InvokeWebServiceDesigner.cs
- DataServicePagingProviderWrapper.cs
- ReachSerializationCacheItems.cs
- HtmlShimManager.cs
- AliasExpr.cs
- DbQueryCommandTree.cs
- NamespaceEmitter.cs
- HasCopySemanticsAttribute.cs
- BufferedStream.cs
- SafeLibraryHandle.cs
- _AutoWebProxyScriptHelper.cs
- RepeaterItem.cs
- GridViewColumnCollection.cs
- dbdatarecord.cs
- UIPermission.cs
- MSAANativeProvider.cs
- XmlElementList.cs
- LayoutInformation.cs
- PropertyTabAttribute.cs
- Switch.cs
- File.cs
- SiteMembershipCondition.cs
- CorePropertiesFilter.cs
- WebPartVerbCollection.cs
- ManagedWndProcTracker.cs
- DebugView.cs
- HttpListenerException.cs
- Context.cs
- TextEditorParagraphs.cs
- CryptoProvider.cs
- DataTable.cs
- WebPartEditorCancelVerb.cs
- MouseGesture.cs
- WorkflowRuntimeServiceElement.cs
- HMACSHA384.cs
- PageAdapter.cs
- HttpHandlersSection.cs
- DynamicMethod.cs
- MetadataFile.cs
- EventHandlersStore.cs
- DataControlFieldCell.cs
- LinkedList.cs
- MatrixCamera.cs
- SettingsContext.cs
- _BufferOffsetSize.cs
- Enum.cs
- DotExpr.cs
- Visitors.cs
- SafeCryptoHandles.cs
- PageThemeCodeDomTreeGenerator.cs
- WindowClosedEventArgs.cs
- SecurityTokenResolver.cs
- Update.cs
- JoinTreeSlot.cs
- MarshalByValueComponent.cs
- GenerateTemporaryTargetAssembly.cs
- OwnerDrawPropertyBag.cs
- DataListCommandEventArgs.cs
- ToolZone.cs
- ReadOnlyHierarchicalDataSourceView.cs
- AnnotationMap.cs
- WebPartVerbCollection.cs
- DragStartedEventArgs.cs