Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / DeferredRunTextReference.cs / 1305600 / DeferredRunTextReference.cs
//---------------------------------------------------------------------------- // // File: DeferredRunTextReference.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 DeferredRunTextReference : DeferredReference { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors internal DeferredRunTextReference(Run run) { _run = run; } #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(_run.ContentStart, _run.ContentEnd); } // Gets the type of the value it represents internal override Type GetValueType() { return typeof(string); } #endregion Internal Methods //------------------------------------------------------ // // Private Fields // //------------------------------------------------------ #region Private Fields // Run mapped to this object. private readonly Run _run; #endregion Private Fields } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // // File: DeferredRunTextReference.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 DeferredRunTextReference : DeferredReference { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors internal DeferredRunTextReference(Run run) { _run = run; } #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(_run.ContentStart, _run.ContentEnd); } // Gets the type of the value it represents internal override Type GetValueType() { return typeof(string); } #endregion Internal Methods //------------------------------------------------------ // // Private Fields // //------------------------------------------------------ #region Private Fields // Run mapped to this object. private readonly Run _run; #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
- EntitySqlQueryBuilder.cs
- TemplateAction.cs
- BaseCollection.cs
- ComAdminInterfaces.cs
- SqlTriggerAttribute.cs
- SearchForVirtualItemEventArgs.cs
- PropertySegmentSerializer.cs
- ServiceEndpointCollection.cs
- PageThemeBuildProvider.cs
- CorrelationActionMessageFilter.cs
- SelectedGridItemChangedEvent.cs
- TreeWalker.cs
- DesignerDataStoredProcedure.cs
- LineInfo.cs
- DataGridViewCellStyle.cs
- SessionEndingCancelEventArgs.cs
- ScriptResourceAttribute.cs
- DiscoveryDefaults.cs
- MethodToken.cs
- TreeNodeSelectionProcessor.cs
- Annotation.cs
- GeneralTransform3DTo2D.cs
- MetadataItemCollectionFactory.cs
- _SSPISessionCache.cs
- QilTargetType.cs
- ControlValuePropertyAttribute.cs
- BoundPropertyEntry.cs
- InputScope.cs
- EncodingDataItem.cs
- TransformedBitmap.cs
- ObjectItemNoOpAssemblyLoader.cs
- Brush.cs
- ModulesEntry.cs
- WindowsStartMenu.cs
- DBDataPermissionAttribute.cs
- SqlRowUpdatingEvent.cs
- ScriptResourceAttribute.cs
- Point3DCollection.cs
- SqlColumnizer.cs
- EncryptedPackage.cs
- XsdBuildProvider.cs
- SqlXml.cs
- PersonalizationEntry.cs
- MemberProjectedSlot.cs
- AttributeEmitter.cs
- RequestCache.cs
- PipeStream.cs
- DrawingBrush.cs
- QuaternionRotation3D.cs
- EntityWithChangeTrackerStrategy.cs
- XmlLanguage.cs
- BamlTreeMap.cs
- RepeaterItem.cs
- RootProjectionNode.cs
- DetailsViewUpdatedEventArgs.cs
- TableLayout.cs
- XmlObjectSerializerWriteContext.cs
- XmlElementAttributes.cs
- MultiAsyncResult.cs
- CaseKeyBox.ViewModel.cs
- FlowDocumentPageViewerAutomationPeer.cs
- ContravarianceAdapter.cs
- PointCollection.cs
- MetadataCollection.cs
- MonitoringDescriptionAttribute.cs
- X509SecurityTokenAuthenticator.cs
- _emptywebproxy.cs
- CollectionType.cs
- StyleHelper.cs
- XmlDictionaryReaderQuotasElement.cs
- StaticExtensionConverter.cs
- FaultContractAttribute.cs
- ColorBlend.cs
- VectorConverter.cs
- UnsafeCollabNativeMethods.cs
- SqlBulkCopy.cs
- WorkItem.cs
- BehaviorService.cs
- Point3DCollectionValueSerializer.cs
- CharacterBuffer.cs
- SystemThemeKey.cs
- ScriptComponentDescriptor.cs
- ToolStripManager.cs
- GridViewSortEventArgs.cs
- CodeMemberField.cs
- XamlTreeBuilder.cs
- RowUpdatedEventArgs.cs
- AutomationPatternInfo.cs
- SafeArrayRankMismatchException.cs
- PaintEvent.cs
- XamlBrushSerializer.cs
- Model3DGroup.cs
- AccessedThroughPropertyAttribute.cs
- SettingsBase.cs
- NameValuePermission.cs
- FixedTextSelectionProcessor.cs
- TypedDataSourceCodeGenerator.cs
- CodeMethodInvokeExpression.cs
- XmlDocumentType.cs
- PathSegment.cs