C#控件系列--文本类控件

C#控件系列--文本类控件

文本类控件主要包括Label、LinkLabel、Button、TextBox以及RichTextBox。

Label

功能

Label用来显示用户不能直接改变的文本信息。

属性

  • Image--指定标签上显示的图像。
  • Text--此属性是与文件相关联的文本。
  • Name--标识对象的名称。
  • AutoSize--如果此属性为true,则启用了根据字号自动调整大小。请注意,这只对文本不换行的标签控件有效。
  • Enabled--是否启用该控件。
  • Visible--可见还是隐藏。

方法

Contains--

CreateControl

Refresh

Select

Show

Hide

SetBounds

Update

时间: 2024-08-02 02:47:51

C#控件系列--文本类控件的相关文章

重新想象 Windows 8.1 Store Apps (77) - 控件增强: 文本类控件的增强, 部分控件增加了 Header 属性和 HeaderTemplate 属性, 部分控件增加了 PlaceholderText 属性

[源码下载] 重新想象 Windows 8.1 Store Apps (77) - 控件增强: 文本类控件的增强, 部分控件增加了 Header 属性和 HeaderTemplate 属性, 部分控件增加了 PlaceholderText 属性 作者:webabcd介绍重新想象 Windows 8.1 Store Apps 之控件增强 文本类控件的增强 为一些控件增加了 Header 属性和 HeaderTemplate 属性 为一些控件增加了 PlaceholderText 属性 示例1.演示

C#控件系列--选择类控件

C#控件系列--选择类控件 选择类控件主要包括:ComboBox.CheckBox.CheckedListBox.RadioButton.NumericUpDown以及ListBox. ComboBox 功能 ComboBox控件用于在下拉组合框中显示数据,它结合了TextBox控件和ListBox控件的功能. 属性

Winform控件之文本类控件

对于一个应用程序而言,控件是搭建用户界面的积木.它们具备交互式的特征.VS 2012中的控件都放在工具箱中,添加一个控件到窗体,只需在工具箱中选择好要添加的控件,并按住鼠标左键,拖动到窗体上即可.向窗体上添加控件还有另一个方法,就是通过代码来实现,即可通过窗体的Controls类的Add方法,格式为:窗体标识.Controls.Add(控件标识).通过代码的方法添加控件比较麻烦,基本上是不会使用这种方法的. 文本类控件包含标签控件(Label),按钮控件(Button),文本框控件(TextBo

背水一战 Windows 10 (28) - 控件(文本类): TextBox, PasswordBox

原文:背水一战 Windows 10 (28) - 控件(文本类): TextBox, PasswordBox [源码下载] 作者:webabcd 介绍背水一战 Windows 10 之 控件(文本类) TextBox PasswordBox 示例1.TextBox 的示例 1Controls/TextControl/TextBoxDemo1.xaml <Page x:Class="Windows10.Controls.TextControl.TextBoxDemo1" xmln

背水一战 Windows 10 (27) - 控件(文本类): TextBlock

原文:背水一战 Windows 10 (27) - 控件(文本类): TextBlock [源码下载] 作者:webabcd 介绍背水一战 Windows 10 之 控件(文本类) TextBlock 示例1.TextBlock 的示例 1Controls/TextControl/TextBlockDemo1.xaml <Page x:Class="Windows10.Controls.TextControl.TextBlockDemo1" xmlns="http://

背水一战 Windows 10 (29) - 控件(文本类): RichTextBlock, RichTextBlockOverflow, RichEditBox

原文:背水一战 Windows 10 (29) - 控件(文本类): RichTextBlock, RichTextBlockOverflow, RichEditBox [源码下载] 作者:webabcd 介绍背水一战 Windows 10 之 控件(文本类) RichTextBlock RichTextBlockOverflow RichEditBox 示例1.RichTextBlock 的示例Controls/TextControl/RichTextBlockDemo.xaml <Page

背水一战 Windows 10 (30) - 控件(文本类): AutoSuggestBox

原文:背水一战 Windows 10 (30) - 控件(文本类): AutoSuggestBox [源码下载] 作者:webabcd 介绍背水一战 Windows 10 之 控件(文本类) AutoSuggestBox 示例Controls/TextControl/AutoSuggestBoxDemo.xaml <Page x:Class="Windows10.Controls.TextControl.AutoSuggestBoxDemo" xmlns="http:/

控件(文本类): TextBox, PasswordBox

介绍背水一战 Windows 10 之 控件(文本类) TextBox PasswordBox 示例1.TextBox 的示例 1Controls/TextControl/TextBoxDemo1.xaml <Page x:Class="Windows10.Controls.TextControl.TextBoxDemo1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xm

控件(文本类): TextBlock

1.TextBlock 的示例 1Controls/TextControl/TextBlockDemo1.xaml <Page x:Class="Windows10.Controls.TextControl.TextBlockDemo1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/win