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
- XmlSchemaSimpleTypeList.cs
- AstTree.cs
- HwndStylusInputProvider.cs
- SchemaCollectionPreprocessor.cs
- XmlQueryContext.cs
- ValidationSummary.cs
- ObjectDataSourceView.cs
- Command.cs
- Regex.cs
- PasswordPropertyTextAttribute.cs
- CellRelation.cs
- assemblycache.cs
- TraceProvider.cs
- TableCellCollection.cs
- IsolatedStorageFile.cs
- OperationFormatter.cs
- KeyEventArgs.cs
- safex509handles.cs
- RelationshipNavigation.cs
- QueryExpr.cs
- ICspAsymmetricAlgorithm.cs
- X509AsymmetricSecurityKey.cs
- ColumnHeaderConverter.cs
- NetworkAddressChange.cs
- COM2Properties.cs
- Matrix3D.cs
- BrowserCapabilitiesCodeGenerator.cs
- SubclassTypeValidator.cs
- PartBasedPackageProperties.cs
- xmlNames.cs
- NetworkInformationException.cs
- XmlJsonReader.cs
- ScrollPatternIdentifiers.cs
- RelationshipType.cs
- ArrayElementGridEntry.cs
- ServiceHostingEnvironment.cs
- ApplicationGesture.cs
- ProfileGroupSettings.cs
- filewebresponse.cs
- JsonFaultDetail.cs
- WorkingDirectoryEditor.cs
- ProxyWebPartManager.cs
- AnnotationHelper.cs
- SharedStatics.cs
- TableDetailsCollection.cs
- PlatformCulture.cs
- PropertyMap.cs
- RunClient.cs
- UIElementAutomationPeer.cs
- DataGridViewComboBoxCell.cs
- ObjectStateEntryDbDataRecord.cs
- ResourceType.cs
- VectorKeyFrameCollection.cs
- _NestedMultipleAsyncResult.cs
- WindowsEditBox.cs
- RecordConverter.cs
- ComponentDispatcher.cs
- mediaeventargs.cs
- ArrayHelper.cs
- PageContentAsyncResult.cs
- RequestCachePolicy.cs
- DATA_BLOB.cs
- ServiceOperationListItem.cs
- OleDbFactory.cs
- SqlCacheDependencyDatabase.cs
- oledbconnectionstring.cs
- BooleanExpr.cs
- UserControl.cs
- XmlAnyElementAttribute.cs
- TextParagraphCache.cs
- ValidationResult.cs
- WebPartDescriptionCollection.cs
- DoubleLink.cs
- Errors.cs
- StatusBar.cs
- URLString.cs
- DataGridViewCheckBoxColumn.cs
- PropertyValueUIItem.cs
- ToolStripDropDownClosingEventArgs.cs
- RtfToken.cs
- ListView.cs
- sqlinternaltransaction.cs
- EntityTransaction.cs
- HttpRequestCacheValidator.cs
- ListCollectionView.cs
- FileVersion.cs
- DSACryptoServiceProvider.cs
- ProtocolInformationWriter.cs
- StandardMenuStripVerb.cs
- WebCategoryAttribute.cs
- HtmlInputRadioButton.cs
- ControlCachePolicy.cs
- TextBoxBase.cs
- WithParamAction.cs
- TabItem.cs
- WindowsAltTab.cs
- _BasicClient.cs
- WorkflowInstanceExtensionCollection.cs
- SchemaTableOptionalColumn.cs
- EntityDataSourceDataSelection.cs