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
- UIElementParaClient.cs
- PropertyInfoSet.cs
- WpfWebRequestHelper.cs
- OutputCacheSection.cs
- LogicalMethodInfo.cs
- ProfileInfo.cs
- ConnectionPoint.cs
- DaylightTime.cs
- CFStream.cs
- BoolExpression.cs
- SHA384Managed.cs
- Encoder.cs
- Pen.cs
- AsymmetricSignatureFormatter.cs
- SqlLiftWhereClauses.cs
- ContentIterators.cs
- DirtyTextRange.cs
- MonthChangedEventArgs.cs
- Events.cs
- BitmapEffectGeneralTransform.cs
- ObservableDictionary.cs
- DateBoldEvent.cs
- BrushValueSerializer.cs
- WsdlBuildProvider.cs
- XmlNodeChangedEventArgs.cs
- Version.cs
- ToolStripContentPanelRenderEventArgs.cs
- SystemEvents.cs
- HtmlTitle.cs
- SharedUtils.cs
- FontStretchConverter.cs
- CheckableControlBaseAdapter.cs
- ConnectionConsumerAttribute.cs
- TableItemPattern.cs
- QueryOutputWriter.cs
- TextEndOfLine.cs
- newinstructionaction.cs
- HttpModuleActionCollection.cs
- ForwardPositionQuery.cs
- WindowVisualStateTracker.cs
- LocalBuilder.cs
- WebPartExportVerb.cs
- ItemCheckEvent.cs
- ErrorFormatter.cs
- XmlSerializationGeneratedCode.cs
- CallTemplateAction.cs
- VisualBrush.cs
- TextTreeDeleteContentUndoUnit.cs
- ToolboxDataAttribute.cs
- PageStatePersister.cs
- ScaleTransform.cs
- TdsParserSafeHandles.cs
- MobileControlDesigner.cs
- ExpressionVisitorHelpers.cs
- RadioButtonFlatAdapter.cs
- TriState.cs
- Schedule.cs
- CompilerTypeWithParams.cs
- Ref.cs
- SimpleApplicationHost.cs
- CqlWriter.cs
- StreamWriter.cs
- TrackingServices.cs
- MimeMapping.cs
- CodeExporter.cs
- Module.cs
- PerformanceCounter.cs
- KnownBoxes.cs
- EnlistmentState.cs
- CommandConverter.cs
- DataGridViewDataErrorEventArgs.cs
- JpegBitmapDecoder.cs
- ErrorProvider.cs
- ProtectedUri.cs
- GiveFeedbackEventArgs.cs
- ChannelDispatcherBase.cs
- WebPartTracker.cs
- MimeObjectFactory.cs
- MediaContextNotificationWindow.cs
- GlobalizationSection.cs
- FlowDocument.cs
- ServiceReference.cs
- ProfileManager.cs
- PageAsyncTaskManager.cs
- ClientTargetCollection.cs
- RequestQueue.cs
- DynamicScriptObject.cs
- Wildcard.cs
- SqlProfileProvider.cs
- DesignTimeData.cs
- TemplateBindingExpressionConverter.cs
- CodeTypeParameter.cs
- URIFormatException.cs
- LoginView.cs
- FormatConvertedBitmap.cs
- DataGridBeginningEditEventArgs.cs
- Substitution.cs
- CompositeActivityCodeGenerator.cs
- ContentPlaceHolder.cs
- TextElementCollection.cs