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
- XmlIncludeAttribute.cs
- ComAwareEventInfo.cs
- ContentElementCollection.cs
- TemplateInstanceAttribute.cs
- GridViewCellAutomationPeer.cs
- BindingExpressionUncommonField.cs
- AppModelKnownContentFactory.cs
- NamedPipeAppDomainProtocolHandler.cs
- BamlBinaryReader.cs
- SafeNativeMethods.cs
- TypeSemantics.cs
- ISAPIApplicationHost.cs
- InlineUIContainer.cs
- HuffCodec.cs
- smtpconnection.cs
- ControlValuePropertyAttribute.cs
- SafeHandles.cs
- HttpHandlerActionCollection.cs
- ControlIdConverter.cs
- XsltFunctions.cs
- InlineUIContainer.cs
- MdiWindowListItemConverter.cs
- SafeUserTokenHandle.cs
- DynamicDataRouteHandler.cs
- Rule.cs
- UnsafePeerToPeerMethods.cs
- ChtmlTextWriter.cs
- DataGridViewCellCancelEventArgs.cs
- DataServiceResponse.cs
- MailDefinition.cs
- MergePropertyDescriptor.cs
- EntityDataSourceConfigureObjectContext.cs
- UserValidatedEventArgs.cs
- LightweightCodeGenerator.cs
- TextEditorSpelling.cs
- StorageAssociationSetMapping.cs
- TraceRecord.cs
- SettingsProperty.cs
- GenericEnumerator.cs
- WebAdminConfigurationHelper.cs
- VirtualizedCellInfoCollection.cs
- ProfileSettingsCollection.cs
- mediaeventargs.cs
- DocumentReference.cs
- _IPv6Address.cs
- ImmComposition.cs
- ListViewPagedDataSource.cs
- DecimalSumAggregationOperator.cs
- OleDbException.cs
- DebugView.cs
- GestureRecognitionResult.cs
- EncodingInfo.cs
- GeometryModel3D.cs
- CancellationToken.cs
- DesignerAttributeInfo.cs
- SmtpAuthenticationManager.cs
- XPathScanner.cs
- XmlBaseWriter.cs
- LineGeometry.cs
- ManagedIStream.cs
- ExpressionBindingCollection.cs
- ObfuscationAttribute.cs
- CategoryNameCollection.cs
- SoapElementAttribute.cs
- recordstate.cs
- DataGridViewDataErrorEventArgs.cs
- Pens.cs
- JoinElimination.cs
- EntityCommandCompilationException.cs
- XmlSchemaSimpleContent.cs
- XsdBuilder.cs
- GroupQuery.cs
- ChangesetResponse.cs
- activationcontext.cs
- SmtpAuthenticationManager.cs
- ToolStripDropDownClosedEventArgs.cs
- SdlChannelSink.cs
- QueryCacheManager.cs
- SourceLocation.cs
- TracedNativeMethods.cs
- xmlfixedPageInfo.cs
- JpegBitmapDecoder.cs
- TemplatedWizardStep.cs
- ConstructorNeedsTagAttribute.cs
- DataGridViewCellValidatingEventArgs.cs
- OrthographicCamera.cs
- NativeMethods.cs
- BuilderInfo.cs
- Set.cs
- TextModifierScope.cs
- TableNameAttribute.cs
- SimpleBitVector32.cs
- CodeTypeOfExpression.cs
- MasterPage.cs
- GraphicsState.cs
- WinFormsComponentEditor.cs
- DocumentPageTextView.cs
- UserInitiatedNavigationPermission.cs
- invalidudtexception.cs
- AppLevelCompilationSectionCache.cs