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
- UDPClient.cs
- InputMethodStateChangeEventArgs.cs
- NumberSubstitution.cs
- CellRelation.cs
- _StreamFramer.cs
- DecoderFallbackWithFailureFlag.cs
- AsmxEndpointPickerExtension.cs
- Errors.cs
- AppDomainShutdownMonitor.cs
- SqlClientWrapperSmiStreamChars.cs
- ElementMarkupObject.cs
- SoapAttributes.cs
- TimerElapsedEvenArgs.cs
- WindowsSysHeader.cs
- SystemColors.cs
- NativeMethods.cs
- DataListItem.cs
- MarshalByRefObject.cs
- SchemaAttDef.cs
- ValidatedControlConverter.cs
- RightsManagementLicense.cs
- SqlBooleanMismatchVisitor.cs
- SQLBinaryStorage.cs
- ClockController.cs
- ColumnMapCopier.cs
- DrawingContext.cs
- TextRange.cs
- SqlDataSourceView.cs
- BooleanSwitch.cs
- File.cs
- EmptyEnumerator.cs
- GeometryCollection.cs
- HitTestWithPointDrawingContextWalker.cs
- MaskDesignerDialog.cs
- MediaPlayer.cs
- UnsafeCollabNativeMethods.cs
- SafeTokenHandle.cs
- ColorTranslator.cs
- RuntimeWrappedException.cs
- MenuItemBinding.cs
- WindowInteropHelper.cs
- SystemIPGlobalProperties.cs
- CorrelationResolver.cs
- RegexGroup.cs
- FunctionNode.cs
- PreApplicationStartMethodAttribute.cs
- VerticalAlignConverter.cs
- SqlUserDefinedTypeAttribute.cs
- FixedNode.cs
- EncoderFallback.cs
- UnknownMessageReceivedEventArgs.cs
- WeakRefEnumerator.cs
- WeakRefEnumerator.cs
- TextEffectResolver.cs
- DesignerForm.cs
- TimeStampChecker.cs
- SrgsRulesCollection.cs
- HMACSHA512.cs
- TemplateField.cs
- Enumerable.cs
- SolidBrush.cs
- Empty.cs
- VariantWrapper.cs
- _Events.cs
- DeclarativeConditionsCollection.cs
- _NestedSingleAsyncResult.cs
- BindingsCollection.cs
- CultureMapper.cs
- DataGridCaption.cs
- Exceptions.cs
- SqlRetyper.cs
- EventArgs.cs
- Variable.cs
- MembershipUser.cs
- StorageRoot.cs
- BehaviorService.cs
- EventToken.cs
- Point4DValueSerializer.cs
- InspectionWorker.cs
- DataGridViewHeaderCell.cs
- BitmapMetadata.cs
- UIElementAutomationPeer.cs
- DataBinder.cs
- LogLogRecordEnumerator.cs
- RadialGradientBrush.cs
- TextRangeBase.cs
- DataGridViewRow.cs
- ListManagerBindingsCollection.cs
- EntityStoreSchemaFilterEntry.cs
- MenuAdapter.cs
- SqlDuplicator.cs
- DataGridTableCollection.cs
- LineServicesRun.cs
- SqlStatistics.cs
- ByteStreamGeometryContext.cs
- HttpServerVarsCollection.cs
- CustomExpression.cs
- DataGridViewDesigner.cs
- Utils.cs
- ParameterModifier.cs