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
- ScrollPattern.cs
- AbsoluteQuery.cs
- DeviceContext2.cs
- KeyValueConfigurationCollection.cs
- ControlBindingsConverter.cs
- PersistChildrenAttribute.cs
- BamlResourceDeserializer.cs
- EmbeddedMailObjectsCollection.cs
- OleStrCAMarshaler.cs
- SqlClientPermission.cs
- XmlSerializerOperationFormatter.cs
- IsolatedStorageFilePermission.cs
- Scene3D.cs
- ReadOnlyCollection.cs
- CanonicalizationDriver.cs
- UdpRetransmissionSettings.cs
- PropertyCondition.cs
- SQLInt32.cs
- IxmlLineInfo.cs
- TreeNode.cs
- PeerCustomResolverSettings.cs
- LoginView.cs
- TerminatorSinks.cs
- TimerElapsedEvenArgs.cs
- DataGridViewAutoSizeModeEventArgs.cs
- MimeParameter.cs
- XmlUtil.cs
- SecurityRuntime.cs
- FolderLevelBuildProviderCollection.cs
- TraceSection.cs
- SafeIUnknown.cs
- BamlResourceContent.cs
- SharedStream.cs
- ResumeStoryboard.cs
- TextServicesProperty.cs
- FilteredSchemaElementLookUpTable.cs
- TypeListConverter.cs
- RectConverter.cs
- BaseProcessor.cs
- GeneralTransform2DTo3D.cs
- WindowCollection.cs
- AffineTransform3D.cs
- WebPartTransformer.cs
- XmlIncludeAttribute.cs
- ImageDrawing.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- WindowsSpinner.cs
- LinqDataSourceHelper.cs
- SrgsToken.cs
- FragmentQueryProcessor.cs
- ElementInit.cs
- LinkedResource.cs
- safex509handles.cs
- glyphs.cs
- Matrix.cs
- ParameterSubsegment.cs
- TableRowCollection.cs
- FixedTextContainer.cs
- CodeValidator.cs
- DefaultSettingsSection.cs
- UInt64Converter.cs
- CompilationUnit.cs
- IndexedEnumerable.cs
- ContainerSelectorGlyph.cs
- BindingWorker.cs
- DoubleCollectionConverter.cs
- GACIdentityPermission.cs
- ChtmlPhoneCallAdapter.cs
- LabelInfo.cs
- XmlNodeChangedEventArgs.cs
- odbcmetadatacollectionnames.cs
- ContextMenuService.cs
- HttpListenerException.cs
- DataGridColumn.cs
- TraversalRequest.cs
- typedescriptorpermissionattribute.cs
- RawStylusInputReport.cs
- UserPreferenceChangingEventArgs.cs
- WriteStateInfoBase.cs
- Point4D.cs
- TextFormatterHost.cs
- SecurityDocument.cs
- PermissionSetTriple.cs
- FormViewUpdateEventArgs.cs
- SapiGrammar.cs
- AdapterUtil.cs
- HtmlInputText.cs
- NextPreviousPagerField.cs
- XmlTextReader.cs
- EventMap.cs
- DispatcherExceptionFilterEventArgs.cs
- StrongNameMembershipCondition.cs
- RoutedEventValueSerializer.cs
- XmlElementAttributes.cs
- RectangleGeometry.cs
- SQLByteStorage.cs
- SafeCryptoHandles.cs
- FixedSchema.cs
- PositiveTimeSpanValidatorAttribute.cs
- UrlEncodedParameterWriter.cs