Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- ParameterEditorUserControl.cs
- WCFServiceClientProxyGenerator.cs
- BinaryObjectReader.cs
- ProxyElement.cs
- KnownIds.cs
- SpeechSeg.cs
- RangeValidator.cs
- TypeRefElement.cs
- HighContrastHelper.cs
- DataGridViewLinkCell.cs
- HtmlHead.cs
- ValidationContext.cs
- SafeNativeMethods.cs
- XamlTreeBuilder.cs
- ObjectDataSourceSelectingEventArgs.cs
- PrinterSettings.cs
- StrongTypingException.cs
- ApplicationDirectoryMembershipCondition.cs
- X509CertificateInitiatorServiceCredential.cs
- WindowsGraphicsCacheManager.cs
- JavaScriptSerializer.cs
- RectAnimationBase.cs
- TemplateBindingExpression.cs
- COM2EnumConverter.cs
- SByte.cs
- CommandTreeTypeHelper.cs
- FilteredDataSetHelper.cs
- IdentityManager.cs
- Touch.cs
- _TLSstream.cs
- Int32RectConverter.cs
- TextDecorationUnitValidation.cs
- ValueSerializer.cs
- TextElementEnumerator.cs
- ActivityTrace.cs
- PermissionAttributes.cs
- DefaultAssemblyResolver.cs
- DataView.cs
- MethodBody.cs
- TextTreeUndoUnit.cs
- GuidConverter.cs
- CodeDomLoader.cs
- TextSelectionHelper.cs
- FrameworkElementAutomationPeer.cs
- ReversePositionQuery.cs
- Lock.cs
- ListBox.cs
- UniformGrid.cs
- XmlSchemaObject.cs
- DataGridColumnHeadersPresenterAutomationPeer.cs
- InvalidateEvent.cs
- StylusPointPropertyUnit.cs
- Function.cs
- ObjectDataSourceFilteringEventArgs.cs
- Preprocessor.cs
- SystemInformation.cs
- PasswordBoxAutomationPeer.cs
- PackUriHelper.cs
- MenuItem.cs
- DiffuseMaterial.cs
- WebServiceFault.cs
- ResourceKey.cs
- ValueUnavailableException.cs
- ObjectDataProvider.cs
- GlobalDataBindingHandler.cs
- AuthenticationException.cs
- DateTime.cs
- AnnotationResourceChangedEventArgs.cs
- OdbcPermission.cs
- DataGridViewTextBoxEditingControl.cs
- EventLogEntry.cs
- WebPartCancelEventArgs.cs
- DataGridColumnHeadersPresenterAutomationPeer.cs
- HwndPanningFeedback.cs
- DesigntimeLicenseContextSerializer.cs
- HtmlValidatorAdapter.cs
- WsdlHelpGeneratorElement.cs
- GenericRootAutomationPeer.cs
- SessionPageStateSection.cs
- EntityDataSourceMemberPath.cs
- XmlSchemaCollection.cs
- NullableFloatAverageAggregationOperator.cs
- CustomAssemblyResolver.cs
- BufferAllocator.cs
- WebServiceBindingAttribute.cs
- SoapHeaderAttribute.cs
- TypeToStringValueConverter.cs
- ResourceExpressionBuilder.cs
- WizardSideBarListControlItemEventArgs.cs
- DataRowExtensions.cs
- Vector3DValueSerializer.cs
- WindowsIPAddress.cs
- CLRBindingWorker.cs
- BasicCellRelation.cs
- NamespaceExpr.cs
- FunctionUpdateCommand.cs
- RichTextBoxConstants.cs
- ActivitySurrogate.cs
- SqlOuterApplyReducer.cs
- RSAPKCS1KeyExchangeDeformatter.cs