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
- InvokeProviderWrapper.cs
- HtmlInputText.cs
- StylusShape.cs
- AnnotationResourceChangedEventArgs.cs
- HtmlControlPersistable.cs
- HttpListener.cs
- BinaryReader.cs
- ArrayEditor.cs
- TagPrefixAttribute.cs
- FileDialog.cs
- COM2PropertyDescriptor.cs
- DataServiceStreamProviderWrapper.cs
- DateTimeOffset.cs
- SmiEventSink.cs
- Keywords.cs
- InkCanvasFeedbackAdorner.cs
- RequestQueryParser.cs
- ConfigurationElement.cs
- EnvelopeVersion.cs
- DocumentStream.cs
- ServiceModelActivationSectionGroup.cs
- HwndSourceParameters.cs
- SafeEventLogWriteHandle.cs
- DataGridToolTip.cs
- Literal.cs
- CodeDomConfigurationHandler.cs
- PointConverter.cs
- SqlWriter.cs
- Byte.cs
- MethodRental.cs
- TextSpan.cs
- SqlDataSource.cs
- CodeNamespaceCollection.cs
- RoutedEventArgs.cs
- WebControlAdapter.cs
- SqlPersonalizationProvider.cs
- arc.cs
- ByteStorage.cs
- BlurBitmapEffect.cs
- DesignerView.Commands.cs
- StrokeCollection.cs
- CreateUserWizard.cs
- LinearGradientBrush.cs
- TypeInitializationException.cs
- TextCollapsingProperties.cs
- SendMessageContent.cs
- SerializationObjectManager.cs
- WebScriptMetadataMessage.cs
- TemplateBindingExtension.cs
- BoundField.cs
- XmlILIndex.cs
- KeySplineConverter.cs
- DecimalAnimationUsingKeyFrames.cs
- ConfigurationLocation.cs
- EndpointAddressProcessor.cs
- DetailsViewDeletedEventArgs.cs
- ToolStripPanelSelectionGlyph.cs
- NavigationProgressEventArgs.cs
- IntSecurity.cs
- TableLayoutRowStyleCollection.cs
- XmlDataLoader.cs
- SystemGatewayIPAddressInformation.cs
- MaskedTextBox.cs
- CharUnicodeInfo.cs
- StaticExtension.cs
- ListViewInsertionMark.cs
- OrderByBuilder.cs
- ProfileGroupSettingsCollection.cs
- Attributes.cs
- CodeObjectCreateExpression.cs
- StickyNoteAnnotations.cs
- UrlAuthFailedErrorFormatter.cs
- FileDialogCustomPlacesCollection.cs
- FileChangesMonitor.cs
- StatusBar.cs
- SymbolType.cs
- Viewport3DVisual.cs
- RegexGroupCollection.cs
- WebRequestModuleElementCollection.cs
- EndPoint.cs
- FrameworkTemplate.cs
- ZipPackagePart.cs
- odbcmetadatacolumnnames.cs
- PKCS1MaskGenerationMethod.cs
- ProtocolsConfigurationEntry.cs
- GenericWebPart.cs
- TypefaceCollection.cs
- DataBindingCollection.cs
- SettingsSavedEventArgs.cs
- UInt16Storage.cs
- WorkflowTraceTransfer.cs
- WeakReferenceList.cs
- TextTabProperties.cs
- WindowsTreeView.cs
- SectionInformation.cs
- DataServices.cs
- DependencyPropertyChangedEventArgs.cs
- DesignerContextDescriptor.cs
- OperationResponse.cs
- BamlVersionHeader.cs