Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / DeferredTextReference.cs / 1305600 / 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) { string s = TextRangeBase.GetTextInternal(_textContainer.Start, _textContainer.End); TextBox tb = _textContainer.Parent as TextBox; if (tb != null) { tb.OnDeferredTextReferenceResolved(this, s); } return s; } // 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
- InvalidPrinterException.cs
- DataTableNewRowEvent.cs
- RectangleHotSpot.cs
- DrawingContext.cs
- StringSorter.cs
- MappingItemCollection.cs
- MenuItemBindingCollection.cs
- SharedStatics.cs
- followingsibling.cs
- TextFindEngine.cs
- TextTreeRootTextBlock.cs
- DescendantBaseQuery.cs
- DataBinding.cs
- ProfileServiceManager.cs
- CanonicalXml.cs
- EventNotify.cs
- ListItem.cs
- SelectionEditingBehavior.cs
- DatagridviewDisplayedBandsData.cs
- DesignUtil.cs
- ToolStripOverflow.cs
- QueryCacheEntry.cs
- RecognizerBase.cs
- XamlTemplateSerializer.cs
- Row.cs
- SignatureGenerator.cs
- EntityDataSourceWrapperCollection.cs
- NullableConverter.cs
- _BufferOffsetSize.cs
- MetadataArtifactLoaderCompositeResource.cs
- DbMetaDataCollectionNames.cs
- FlowLayout.cs
- sqlcontext.cs
- UIAgentAsyncBeginRequest.cs
- PropertyRecord.cs
- AudienceUriMode.cs
- ReadOnlyDictionary.cs
- MultiAsyncResult.cs
- WindowsButton.cs
- EventLog.cs
- SqlProviderManifest.cs
- SweepDirectionValidation.cs
- MetadataUtil.cs
- SQLString.cs
- AppSettingsReader.cs
- Exception.cs
- SqlCommandBuilder.cs
- StylusShape.cs
- _PooledStream.cs
- FigureParaClient.cs
- TextBoxDesigner.cs
- ExtendedPropertyDescriptor.cs
- SortKey.cs
- TranslateTransform.cs
- VirtualDirectoryMappingCollection.cs
- Variable.cs
- ImplicitInputBrush.cs
- PriorityBinding.cs
- PassportIdentity.cs
- PartialTrustHelpers.cs
- RuntimeUtils.cs
- Lookup.cs
- WinEventQueueItem.cs
- ISCIIEncoding.cs
- NameService.cs
- RowSpanVector.cs
- CorrelationManager.cs
- HttpFileCollectionBase.cs
- ErrorTolerantObjectWriter.cs
- SingleAnimation.cs
- XmlUrlResolver.cs
- LiteralControl.cs
- QuerySetOp.cs
- DiscoveryDocument.cs
- TextServicesManager.cs
- AutomationElement.cs
- DataTableMappingCollection.cs
- DataSourceGeneratorException.cs
- DefaultObjectMappingItemCollection.cs
- CodeGeneratorOptions.cs
- ObjectQuery_EntitySqlExtensions.cs
- StateMachineWorkflowInstance.cs
- GuidelineSet.cs
- DefaultProxySection.cs
- WindowsFormsHelpers.cs
- EntityStoreSchemaFilterEntry.cs
- ControlTemplate.cs
- PipelineModuleStepContainer.cs
- TcpConnectionPoolSettingsElement.cs
- ObservableDictionary.cs
- SoapElementAttribute.cs
- StandardCommands.cs
- SmiGettersStream.cs
- FileBasedResourceGroveler.cs
- Point4DValueSerializer.cs
- LinkConverter.cs
- SqlTypeConverter.cs
- ParallelLoopState.cs
- DockAndAnchorLayout.cs
- NamespaceTable.cs