WPF-Control-ContentControl
#region 程序集 PresentationFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 // C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\10.0.9\ref\net10.0\PresentationFramework.dll #endregion using System.Collections; using System.ComponentModel; using System.Windows.Markup; namespace System.Windows.Controls { // // 摘要: // Represents a control with a single piece of content of any type. [ContentProperty("Content")] [DefaultProperty("Content")] [Localizability(LocalizationCategory.None, Readability = Readability.Unreadable)] public class ContentControl : Control, IAddChild { // // 摘要: // Identifies the System.Windows.Controls.ContentControl.Content dependency property. public static readonly DependencyProperty ContentProperty; // // 摘要: // Identifies the System.Windows.Controls.ContentControl.ContentStringFormat dependency // property. public static readonly DependencyProperty ContentStringFormatProperty; // // 摘要: // Identifies the System.Windows.Controls.ContentControl.ContentTemplate dependency // property. public static readonly DependencyProperty ContentTemplateProperty; // // 摘要: // Identifies the System.Windows.Controls.ContentControl.ContentTemplateSelector // dependency property. public static readonly DependencyProperty ContentTemplateSelectorProperty; // // 摘要: // Identifies the System.Windows.Controls.ContentControl.HasContent dependency property. public static readonly DependencyProperty HasContentProperty; // // 摘要: // Initializes a new instance of the System.Windows.Controls.ContentControl class. public ContentControl(); // // 摘要: // Gets or sets a template selector that enables an application writer to provide // custom template-selection logic. // // 返回结果: // A data template selector. The default value is null. [Bindable(true)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public DataTemplateSelector ContentTemplateSelector { get; set; } // // 摘要: // Gets or sets the data template used to display the content of the System.Windows.Controls.ContentControl. // // // 返回结果: // A data template. The default value is null. [Bindable(true)] public DataTemplate ContentTemplate { get; set; } // // 摘要: // Gets or sets a composite string that specifies how to format the System.Windows.Controls.ContentControl.Content // property if it is displayed as a string. // // 返回结果: // A composite string that specifies how to format the System.Windows.Controls.ContentControl.Content // property if it is displayed as a string. [Bindable(true)] public string ContentStringFormat { get; set; } // // 摘要: // Gets a value that indicates whether the System.Windows.Controls.ContentControl // contains content. // // 返回结果: // true if the System.Windows.Controls.ContentControl has content; otherwise false. // The default value is false. [Browsable(false)] [ReadOnly(true)] public bool HasContent { get; } // // 摘要: // Gets or sets the content of a System.Windows.Controls.ContentControl. // // 返回结果: // An object that contains the control's content. The default value is null. [Bindable(true)] public object Content { get; set; } // // 摘要: // Gets an enumerator to the content control's logical child elements. // // 返回结果: // An enumerator. The default value is null. protected internal override IEnumerator LogicalChildren { get; } // // 摘要: // Indicates whether the System.Windows.Controls.ContentControl.Content property // should be persisted. // // 返回结果: // true if the System.Windows.Controls.ContentControl.Content property should be // persisted; otherwise, false. [EditorBrowsable(EditorBrowsableState.Never)] public virtual bool ShouldSerializeContent(); // // 摘要: // Adds a specified object as the child of a System.Windows.Controls.ContentControl. // // // 参数: // value: // The object to add. protected virtual void AddChild(object value); // // 摘要: // Adds a specified text string to a System.Windows.Controls.ContentControl. // // 参数: // text: // The string to add. protected virtual void AddText(string text); // // 摘要: // Called when the System.Windows.Controls.ContentControl.Content property changes. // // // 参数: // oldContent: // The old value of the System.Windows.Controls.ContentControl.Content property. // // // newContent: // The new value of the System.Windows.Controls.ContentControl.Content property. protected virtual void OnContentChanged(object oldContent, object newContent); // // 摘要: // Occurs when the System.Windows.Controls.ContentControl.ContentStringFormat property // changes. // // 参数: // oldContentStringFormat: // The old value of System.Windows.Controls.ContentControl.ContentStringFormat. // // // newContentStringFormat: // The new value of System.Windows.Controls.ContentControl.ContentStringFormat. protected virtual void OnContentStringFormatChanged(string oldContentStringFormat, string newContentStringFormat); // // 摘要: // Called when the System.Windows.Controls.ContentControl.ContentTemplate property // changes. // // 参数: // oldContentTemplate: // The old value of the System.Windows.Controls.ContentControl.ContentTemplate property. // // // newContentTemplate: // The new value of the System.Windows.Controls.ContentControl.ContentTemplate property. protected virtual void OnContentTemplateChanged(DataTemplate oldContentTemplate, DataTemplate newContentTemplate); // // 摘要: // Called when the System.Windows.Controls.ContentControl.ContentTemplateSelector // property changes. // // 参数: // oldContentTemplateSelector: // The old value of the System.Windows.Controls.ContentControl.ContentTemplateSelector // property. // // newContentTemplateSelector: // The new value of the System.Windows.Controls.ContentControl.ContentTemplateSelector // property. protected virtual void OnContentTemplateSelectorChanged(DataTemplateSelector oldContentTemplateSelector, DataTemplateSelector newContentTemplateSelector); } }

海阔凭鱼跃,天高任鸟飞,成功没有捷径,唯有努力前行!

浙公网安备 33010602011771号