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
- LoadItemsEventArgs.cs
- ImageSourceConverter.cs
- DataControlField.cs
- RNGCryptoServiceProvider.cs
- ViewManager.cs
- CodePrimitiveExpression.cs
- COM2ExtendedTypeConverter.cs
- DisplayNameAttribute.cs
- EntityDataSourceWrapperCollection.cs
- Figure.cs
- StrongNameKeyPair.cs
- TrackingProfileManager.cs
- Ops.cs
- CachingHintValidation.cs
- BatchParser.cs
- RuleRefElement.cs
- ViewStateException.cs
- ByteBufferPool.cs
- EntityDataSourceEntitySetNameItem.cs
- ObfuscateAssemblyAttribute.cs
- ScriptControl.cs
- PeerEndPoint.cs
- ServiceModelInstallComponent.cs
- TreeViewItemAutomationPeer.cs
- AdjustableArrowCap.cs
- CommonProperties.cs
- ArglessEventHandlerProxy.cs
- ConvertTextFrag.cs
- SID.cs
- SelectionEditor.cs
- CaseInsensitiveComparer.cs
- EntityTypeEmitter.cs
- ConstNode.cs
- Currency.cs
- BinaryObjectWriter.cs
- PowerModeChangedEventArgs.cs
- SmtpClient.cs
- TextTrailingCharacterEllipsis.cs
- ListViewDeletedEventArgs.cs
- ContourSegment.cs
- SwitchAttribute.cs
- QueryStringParameter.cs
- QuadraticEase.cs
- XsltArgumentList.cs
- GridViewCellAutomationPeer.cs
- EmptyEnumerable.cs
- sqlmetadatafactory.cs
- StylusPointPropertyInfoDefaults.cs
- XamlTreeBuilder.cs
- MenuItem.cs
- DataGridViewCheckBoxCell.cs
- MSG.cs
- DynamicHyperLink.cs
- BidPrivateBase.cs
- LexicalChunk.cs
- CanonicalFormWriter.cs
- BrowserCapabilitiesFactory.cs
- Tile.cs
- Int32CollectionConverter.cs
- SqlUtils.cs
- IImplicitResourceProvider.cs
- XmlMtomWriter.cs
- WriteFileContext.cs
- PreApplicationStartMethodAttribute.cs
- ProfileModule.cs
- RegularExpressionValidator.cs
- Color.cs
- MSG.cs
- HtmlUtf8RawTextWriter.cs
- DataReceivedEventArgs.cs
- InheritanceRules.cs
- MulticastDelegate.cs
- ContainsRowNumberChecker.cs
- SafeCryptContextHandle.cs
- ContextDataSourceView.cs
- TriggerAction.cs
- PathFigureCollection.cs
- XD.cs
- SafeNativeMethodsMilCoreApi.cs
- VirtualDirectoryMappingCollection.cs
- DataControlButton.cs
- ManagementObjectSearcher.cs
- SByteConverter.cs
- NumericPagerField.cs
- ExternalFile.cs
- CodeTypeReferenceCollection.cs
- OracleCommandBuilder.cs
- CachingHintValidation.cs
- Schedule.cs
- VectorAnimationUsingKeyFrames.cs
- SapiRecoInterop.cs
- MonthChangedEventArgs.cs
- KerberosRequestorSecurityToken.cs
- SectionInformation.cs
- TextDecorationCollection.cs
- GradientStop.cs
- BinaryMethodMessage.cs
- ReceiveActivityDesigner.cs
- ImageFormatConverter.cs
- UnsafeNativeMethodsTablet.cs