Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / DeferredTextReference.cs / 1305600 / 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) { string s = TextRangeBase.GetTextInternal(_textContainer.Start, _textContainer.End); TextBox tb = _textContainer.Parent as TextBox; if (tb != null) { tb.OnDeferredTextReferenceResolved(this, s); } return s; } // 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
- WindowsFont.cs
- StringDictionary.cs
- ColumnResizeUndoUnit.cs
- RefType.cs
- Brushes.cs
- ComponentChangedEvent.cs
- EditorPart.cs
- MaterialCollection.cs
- OpCodes.cs
- ImageDrawing.cs
- DataSourceProvider.cs
- CheckBox.cs
- SQLInt16Storage.cs
- OracleSqlParser.cs
- RepeaterItem.cs
- MessageSecurityOverMsmqElement.cs
- HostingEnvironment.cs
- shaperfactory.cs
- CompressionTransform.cs
- ThousandthOfEmRealPoints.cs
- ExtensionWindowResizeGrip.cs
- WindowsTooltip.cs
- SafeProcessHandle.cs
- Mapping.cs
- DbConnectionPoolGroup.cs
- XDRSchema.cs
- FormsAuthenticationTicket.cs
- CheckBoxPopupAdapter.cs
- VirtualDirectoryMapping.cs
- ListViewPagedDataSource.cs
- SrgsOneOf.cs
- HelpProvider.cs
- InvalidDataException.cs
- ProfilePropertySettings.cs
- DESCryptoServiceProvider.cs
- ObjRef.cs
- DoWorkEventArgs.cs
- LassoHelper.cs
- ColorEditor.cs
- SystemWebCachingSectionGroup.cs
- ContentValidator.cs
- LogLogRecordEnumerator.cs
- PolicyConversionContext.cs
- EncodingStreamWrapper.cs
- CompleteWizardStep.cs
- Span.cs
- translator.cs
- OpacityConverter.cs
- Transform3D.cs
- ExpressionEditorAttribute.cs
- ValidatorCollection.cs
- DataGridAutoFormat.cs
- UnmanagedMemoryStreamWrapper.cs
- InternalConfigEventArgs.cs
- ReferenceConverter.cs
- EventToken.cs
- RightsManagementEncryptedStream.cs
- TextServicesHost.cs
- TextEditorParagraphs.cs
- TraceHandler.cs
- UnsafeNativeMethods.cs
- DefaultTraceListener.cs
- NodeLabelEditEvent.cs
- NetSectionGroup.cs
- DBConnection.cs
- DiagnosticTraceSource.cs
- FlowchartDesigner.xaml.cs
- BindingsCollection.cs
- OleDbInfoMessageEvent.cs
- ObjectReaderCompiler.cs
- querybuilder.cs
- smtpconnection.cs
- ToolStripSeparatorRenderEventArgs.cs
- Events.cs
- DataGridSortCommandEventArgs.cs
- GeometryGroup.cs
- Transform3D.cs
- MetadataCacheItem.cs
- UseLicense.cs
- Label.cs
- DynamicDataRoute.cs
- DataGridViewDataErrorEventArgs.cs
- ToolStripDropDownClosedEventArgs.cs
- DesignerActionItemCollection.cs
- EventHandlersStore.cs
- OdbcError.cs
- StreamWriter.cs
- TextMarkerSource.cs
- PersonalizablePropertyEntry.cs
- ExecutionEngineException.cs
- ScrollContentPresenter.cs
- NetMsmqBinding.cs
- Win32SafeHandles.cs
- QuotedPrintableStream.cs
- DependencyObject.cs
- DefaultMemberAttribute.cs
- NativeCppClassAttribute.cs
- ConstraintStruct.cs
- MediaEntryAttribute.cs
- SingleStorage.cs