WPF-FrameworkElement-Control

#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.ComponentModel;
using System.Windows.Input;
using System.Windows.Media;

namespace System.Windows.Controls
{
    //
    // 摘要:
    //     Represents the base class for user interface (UI) elements that use a System.Windows.Controls.ControlTemplate
    //     to define their appearance.
    public class Control : FrameworkElement
    {
        //
        // 摘要:
        //     Identifies the System.Windows.Controls.Control.Background dependency property.
        public static readonly DependencyProperty BackgroundProperty;
        //
        // 摘要:
        //     Identifies the System.Windows.Controls.Control.Template dependency property.
        public static readonly DependencyProperty TemplateProperty;
        //
        // 摘要:
        //     Identifies the System.Windows.Controls.Control.TabIndex dependency property.
        public static readonly DependencyProperty TabIndexProperty;
        //
        // 摘要:
        //     Identifies the System.Windows.Controls.Control.PreviewMouseDoubleClick routed
        //     event.
        public static readonly RoutedEvent PreviewMouseDoubleClickEvent;
        //
        // 摘要:
        //     Identifies the System.Windows.Controls.Control.Padding dependency property.
        public static readonly DependencyProperty PaddingProperty;
        //
        // 摘要:
        //     Identifies the System.Windows.Controls.Control.MouseDoubleClick routed event.
        public static readonly RoutedEvent MouseDoubleClickEvent;
        //
        // 摘要:
        //     Identifies the System.Windows.Controls.Control.IsTabStop dependency property.
        public static readonly DependencyProperty IsTabStopProperty;
        //
        // 摘要:
        //     Identifies the System.Windows.Controls.Control.HorizontalContentAlignment dependency
        //     property.
        public static readonly DependencyProperty HorizontalContentAlignmentProperty;
        //
        // 摘要:
        //     Identifies the System.Windows.Controls.Control.VerticalContentAlignment dependency
        //     property.
        public static readonly DependencyProperty VerticalContentAlignmentProperty;
        //
        // 摘要:
        //     Identifies the System.Windows.Controls.Control.FontWeight dependency property.
        public static readonly DependencyProperty FontWeightProperty;
        //
        // 摘要:
        //     Identifies the System.Windows.Controls.Control.FontStyle dependency property.
        public static readonly DependencyProperty FontStyleProperty;
        //
        // 摘要:
        //     Identifies the System.Windows.Controls.Control.FontStretch dependency property.
        public static readonly DependencyProperty FontStretchProperty;
        //
        // 摘要:
        //     Identifies the System.Windows.Controls.Control.FontSize dependency property.
        public static readonly DependencyProperty FontSizeProperty;
        //
        // 摘要:
        //     Identifies the System.Windows.Controls.Control.FontFamily dependency property.
        public static readonly DependencyProperty FontFamilyProperty;
        //
        // 摘要:
        //     Identifies the System.Windows.Controls.Control.BorderThickness dependency property.
        public static readonly DependencyProperty BorderThicknessProperty;
        //
        // 摘要:
        //     Identifies the System.Windows.Controls.Control.BorderBrush dependency property.
        public static readonly DependencyProperty BorderBrushProperty;
        //
        // 摘要:
        //     Identifies the System.Windows.Controls.Control.Foreground dependency property.
        public static readonly DependencyProperty ForegroundProperty;

        //
        // 摘要:
        //     Initializes a new instance of the System.Windows.Controls.Control class.
        public Control();

        //
        // 摘要:
        //     Gets or sets the weight or thickness of the specified font.
        //
        // 返回结果:
        //     A System.Windows.FontWeight value. The default is System.Windows.FontWeights.Normal.
        [Bindable(true)]
        [Category("Appearance")]
        public FontWeight FontWeight { get; set; }
        //
        // 摘要:
        //     Gets or sets the font style.
        //
        // 返回结果:
        //     A System.Windows.FontStyle value. The default is System.Windows.FontStyles.Normal.
        [Bindable(true)]
        [Category("Appearance")]
        public FontStyle FontStyle { get; set; }
        //
        // 摘要:
        //     Gets or sets the degree to which a font is condensed or expanded on the screen.
        //
        //
        // 返回结果:
        //     A System.Windows.FontStretch value. The default is System.Windows.FontStretches.Normal.
        [Bindable(true)]
        [Category("Appearance")]
        public FontStretch FontStretch { get; set; }
        //
        // 摘要:
        //     Gets or sets the font size.
        //
        // 返回结果:
        //     The size of the text in the System.Windows.Controls.Control. The default is System.Windows.SystemFonts.MessageFontSize.
        //     The font size must be a positive number.
        [Bindable(true)]
        [Category("Appearance")]
        [Localizability(LocalizationCategory.None)]
        [TypeConverter(typeof(FontSizeConverter))]
        public double FontSize { get; set; }
        //
        // 摘要:
        //     Gets or sets the font family of the control.
        //
        // 返回结果:
        //     A font family. The default is the system dialog font.
        [Bindable(true)]
        [Category("Appearance")]
        [Localizability(LocalizationCategory.Font)]
        public FontFamily FontFamily { get; set; }
        //
        // 摘要:
        //     Gets or sets the border thickness of a control.
        //
        // 返回结果:
        //     A thickness value; the default is a thickness of 0 on all four sides.
        [Bindable(true)]
        [Category("Appearance")]
        public Thickness BorderThickness { get; set; }
        //
        // 摘要:
        //     Gets or sets a brush that describes the border background of a control.
        //
        // 返回结果:
        //     The brush that is used to fill the control's border; the default is System.Windows.Media.Brushes.Transparent.
        [Bindable(true)]
        [Category("Appearance")]
        public Brush BorderBrush { get; set; }
        //
        // 摘要:
        //     Gets or sets the padding inside a control.
        //
        // 返回结果:
        //     The amount of space between the content of a System.Windows.Controls.Control
        //     and its System.Windows.FrameworkElement.Margin or System.Windows.Controls.Border.
        //     The default is a thickness of 0 on all four sides.
        [Bindable(true)]
        [Category("Layout")]
        public Thickness Padding { get; set; }
        //
        // 摘要:
        //     Gets or sets the horizontal alignment of the control's content.
        //
        // 返回结果:
        //     One of the System.Windows.HorizontalAlignment values. The default is System.Windows.HorizontalAlignment.Left.
        [Bindable(true)]
        [Category("Layout")]
        public HorizontalAlignment HorizontalContentAlignment { get; set; }
        //
        // 摘要:
        //     Gets or sets a value that indicates whether a control is included in tab navigation.
        //
        //
        // 返回结果:
        //     true if the control is included in tab navigation; otherwise, false. The default
        //     is true.
        [Bindable(true)]
        [Category("Behavior")]
        public bool IsTabStop { get; set; }
        //
        // 摘要:
        //     Gets or sets a value that determines the order in which elements receive focus
        //     when the user navigates through controls by using the TAB key.
        //
        // 返回结果:
        //     A value that determines the order of logical navigation for a device. The default
        //     value is Int32.MaxValue.
        [Bindable(true)]
        [Category("Behavior")]
        public int TabIndex { get; set; }
        //
        // 摘要:
        //     Gets or sets a control template.
        //
        // 返回结果:
        //     The template that defines the appearance of the System.Windows.Controls.Control.
        public ControlTemplate Template { get; set; }
        //
        // 摘要:
        //     Gets or sets the vertical alignment of the control's content.
        //
        // 返回结果:
        //     One of the System.Windows.VerticalAlignment values. The default is System.Windows.VerticalAlignment.Top.
        [Bindable(true)]
        [Category("Layout")]
        public VerticalAlignment VerticalContentAlignment { get; set; }
        //
        // 摘要:
        //     Gets or sets a brush that describes the foreground color.
        //
        // 返回结果:
        //     The brush that paints the foreground of the control. The default value is the
        //     system dialog font color.
        [Bindable(true)]
        [Category("Appearance")]
        public Brush Foreground { get; set; }
        //
        // 摘要:
        //     Gets or sets a brush that describes the background of a control.
        //
        // 返回结果:
        //     The brush that is used to fill the background of the control. The default is
        //     System.Windows.Media.Brushes.Transparent.
        [Bindable(true)]
        [Category("Appearance")]
        public Brush Background { get; set; }
        //
        // 摘要:
        //     Gets a value that indicates whether a control supports scrolling.
        //
        // 返回结果:
        //     true if the control has a System.Windows.Controls.ScrollViewer in its style and
        //     has a custom keyboard scrolling behavior; otherwise, false.
        protected internal virtual bool HandlesScrolling { get; }

        //
        // 摘要:
        //     Occurs when a user clicks the mouse button two or more times.
        public event MouseButtonEventHandler PreviewMouseDoubleClick;
        //
        // 摘要:
        //     Occurs when a mouse button is clicked two or more times.
        public event MouseButtonEventHandler MouseDoubleClick;

        //
        // 摘要:
        //     Returns the string representation of a System.Windows.Controls.Control object.
        //
        //
        // 返回结果:
        //     A string that represents the control.
        public override string ToString();
        //
        // 摘要:
        //     Called to arrange and size the content of a System.Windows.Controls.Control object.
        //
        //
        // 参数:
        //   arrangeBounds:
        //     The computed size that is used to arrange the content.
        //
        // 返回结果:
        //     The size of the control.
        protected override Size ArrangeOverride(Size arrangeBounds);
        //
        // 摘要:
        //     Called to remeasure a control.
        //
        // 参数:
        //   constraint:
        //     The maximum size that the method can return.
        //
        // 返回结果:
        //     The size of the control, up to the maximum specified by constraint.
        protected override Size MeasureOverride(Size constraint);
        //
        // 摘要:
        //     Raises the System.Windows.Controls.Control.MouseDoubleClick routed event.
        //
        // 参数:
        //   e:
        //     The event data.
        protected virtual void OnMouseDoubleClick(MouseButtonEventArgs e);
        //
        // 摘要:
        //     Raises the System.Windows.Controls.Control.PreviewMouseDoubleClick routed event.
        //
        //
        // 参数:
        //   e:
        //     The event data.
        protected virtual void OnPreviewMouseDoubleClick(MouseButtonEventArgs e);
        //
        // 摘要:
        //     Called whenever the control's template changes.
        //
        // 参数:
        //   oldTemplate:
        //     The old template.
        //
        //   newTemplate:
        //     The new template.
        protected virtual void OnTemplateChanged(ControlTemplate oldTemplate, ControlTemplate newTemplate);
    }
}

image

image

 

posted @ 2026-06-15 13:10  Tony.Jia  阅读(6)  评论(0)    收藏  举报