前台:

    <StackPanel>
<TextBlock Margin="" TextWrapping="Wrap">
TextBlock with <Bold>bold</Bold>, <Italic>italic</Italic> and <Underline>underlined</Underline> text.
</TextBlock> <TextBlock>
<Hyperlink NavigateUri="https://www.google.com.hk" RequestNavigate="Hyperlink_RequestNavigate">
Click here
</Hyperlink>
</TextBlock> <TextBlock Margin="" TextWrapping="Wrap">
This text has a <Hyperlink RequestNavigate="Hyperlink_RequestNavigate" NavigateUri="https://www.google.com">link</Hyperlink> in it.
</TextBlock> <TextBlock Margin="" TextWrapping="Wrap">
This <Span FontWeight="Bold">is</Span> a
<Span Background="Silver" Foreground="Maroon">TextBlock</Span>
with <Span TextDecorations="Underline">several</Span>
<Span FontStyle="Italic">Span</Span> elements,
<Span Foreground="Blue">
using a <Bold>variety</Bold> of <Italic>styles</Italic>
</Span>.
</TextBlock> <StackPanel x:Name="sp_text"> </StackPanel> <!--<StackPanel Margin="">
<Label Content="_Name:" Target="{Binding ElementName=txtName}" />
<TextBox Name="txtName" />
<Label Content="{Binding ElementName=txtMail, Mode=TwoWay, Path=Text}" Target="{Binding ElementName=txtMail}" />
<TextBox Name="txtMail" />
</StackPanel>--> </StackPanel>
   <StackPanel>
<TextBlock Margin="" TextWrapping="Wrap">
TextBlock with <Bold>bold</Bold>, <Italic>italic</Italic> and <Underline>underlined</Underline> text.
</TextBlock> <TextBlock>
<Hyperlink NavigateUri="https://www.google.com.hk" RequestNavigate="Hyperlink_RequestNavigate">
Click here
</Hyperlink>
</TextBlock> <TextBlock Margin="" TextWrapping="Wrap">
This text has a <Hyperlink RequestNavigate="Hyperlink_RequestNavigate" NavigateUri="https://www.google.com">link</Hyperlink> in it.
</TextBlock> <TextBlock Margin="" TextWrapping="Wrap">
This <Span FontWeight="Bold">is</Span> a
<Span Background="Silver" Foreground="Maroon">TextBlock</Span>
with <Span TextDecorations="Underline">several</Span>
<Span FontStyle="Italic">Span</Span> elements,
<Span Foreground="Blue">
using a <Bold>variety</Bold> of <Italic>styles</Italic>
</Span>.
</TextBlock> <StackPanel x:Name="sp_text"> </StackPanel> <!--<StackPanel Margin="">
<Label Content="_Name:" Target="{Binding ElementName=txtName}" />
<TextBox Name="txtName" />
<Label Content="{Binding ElementName=txtMail, Mode=TwoWay, Path=Text}" Target="{Binding ElementName=txtMail}" />
<TextBox Name="txtMail" />
</StackPanel>--> </StackPanel> <StackPanel Margin="">
<Label Target="{Binding ElementName=txtName}">
<StackPanel Orientation="Horizontal">
<Image Source="http://cdn1.iconfinder.com/data/icons/fatcow/16/bullet_green.png" />
<AccessText Text="_Name:" />
</StackPanel>
</Label>
<TextBox Name="txtName" />
<Label Target="{Binding ElementName=txtMail}">
<StackPanel Orientation="Horizontal">
<Image Source="http://cdn1.iconfinder.com/data/icons/fatcow/16/bullet_blue.png" />
<AccessText Text="_Mail:" />
</StackPanel>
</Label>
<TextBox Name="txtMail" />
</StackPanel> <Grid Margin="">
<TextBox AcceptsReturn="True" TextWrapping="Wrap" SpellCheck.IsEnabled="True" Language="en-US" />
</Grid> <DockPanel Margin="">
<TextBox SelectionChanged="TextBox_SelectionChanged" DockPanel.Dock="Top" />
<TextBox Name="txtStatus" AcceptsReturn="True" TextWrapping="Wrap" IsReadOnly="True" /> </DockPanel> <StackPanel Margin="">
<Label FontWeight="Bold">Application Options</Label>
<CheckBox>
<TextBlock>
Enable feature <Run Foreground="Green" FontWeight="Bold">ABC</Run>
</TextBlock>
</CheckBox>
<CheckBox IsChecked="True">
<WrapPanel>
<TextBlock>
Enable feature <Run FontWeight="Bold">XYZ</Run>
</TextBlock>
<!--<Image Source="/WpfTutorialSamples;component/Images/question.png" Width="" Height="" Margin="5,0" />-->
</WrapPanel>
</CheckBox>
<CheckBox>
<TextBlock>
Enable feature <Run Foreground="Blue" TextDecorations="Underline" FontWeight="Bold">WWW</Run>
</TextBlock>
</CheckBox>
</StackPanel>

TextBox各种设置的更多相关文章

  1. WPF TextBox 一些设置技巧

    WPF TextBox 一些设置技巧 运行环境:Win10 x64, NetFrameWork 4.8, 作者:乌龙哈里,日期:2019-05-01 参考: 章节: 取消输入法 输入方式设定为Over ...

  2. C#winform的textbox怎么设置滚动条

    用 C#开发软件的时候文本框textbox是没有滚动条的,而且是单行文本.下面教大家如何设置多行,并且设置横向滚动条和垂直滚动条. 打开VS工具,创建一个winform窗体项目.系统会自动创建一个主窗 ...

  3. easyui textbox combobox 设置只读不可编辑状态

    输入框 textbox $("#xx").textbox('setValue','value');  //设置输入框的值 $('#xx').textbox('textbox').a ...

  4. 后台生成textbox并设置多行属性,自动换行

    Table tb = new Table(); TableRow row1 = new TableRow(); TableCell tc1 = new TableCell(); TableCell t ...

  5. WPF 自定义TextBox带水印控件,可设置圆角

    一.简单设置水印TextBox控件,废话不多说看代码: <TextBox TextWrapping="Wrap" Margin="10" Height=& ...

  6. [深入浅出WP8.1(Runtime)]文本框(TextBox)

    4.4 文本框(TextBox) 文本框(TextBox)控件是表示一个可用于显示和编辑单格式.多行文本的控件.TextBox控件常用于在表单中编辑非格式化文本,例如,如果一个表单要求输入用户姓名.电 ...

  7. WPF自定义控件(二)——TextBox

    和之前一样,先来看看效果: 这个TextBox可设置水印,可设置必填和正则表达式验证. 验证?没错,就是验证! 就是在输入完成后,控件一旦失去焦点就会自动验证!会根据我开放出来的“是否可以为空”属性进 ...

  8. TextBox 宽度无效

    TextBox 宽度设置 Width="550px"  在IE10.1011下无效 改为用  style="width:550px; height:200px;" ...

  9. 设置checkbox不能选中,复选框不能选中

    Web开发:设置复选框的只读效果 在Web开发中,有时候需要显示一些复选框(checkbox),表明这个地方是可以进行勾选操作的,但是有时候是只想告知用户"这个地方是可以进行勾选操作的&qu ...

随机推荐

  1. [CUDA] 00 - GPU Driver Installation & Concurrency Programming

    前言 对,这是一个高大上的技术,终于要做老崔当年做过的事情了,生活很传奇. 一.主流 GPU 编程接口 1. CUDA 是英伟达公司推出的,专门针对 N 卡进行 GPU 编程的接口.文档资料很齐全,几 ...

  2. koa和exprsss区别

    koa和exprsss区别 koa没有内置中间件 express有几个内置的中间件,如express.static()//加载静态资源 koa不再有req,res请求,它是封装在context里面 c ...

  3. 暑期——第五周总结(Web连接hbase数据库)

    所花时间:7天 代码行:1000(python)+250(java) 博客量:1篇 了解到知识点 : 在尝试使用hbase当作数据库时,林子雨老师教程中有完整代码关于使用hbase,我就像当然认为只需 ...

  4. Educational Codeforces Round 72 (Rated for Div. 2)

    https://www.cnblogs.com/31415926535x/p/11601964.html 这场只做了前四道,,感觉学到的东西也很多,,最后两道数据结构的题没有补... A. Creat ...

  5. 【Django】中间件,csrf,缓存,信号

    中间件(middleware) 描述:Middlewares 是修改 Django request 或者 response 对象的钩子. 在django中,中间件其实就是一个类,在请求到来和结束后,d ...

  6. 问题:程序编译通过,但是执行时报错:coredump

    问题描述: 在一个客户现场搭建环境时,遇到了一个棘手的问题,C代码编译通过后,无法正常运行,启动会出现“coredump”错误. 运行环境为新搭建的AIX6.1,数据库为Oracle11.2.0.2. ...

  7. Javascript设计模式——建造者模式

    建造者模式是相对比较简单的一种设计模式,属于创建型模式的一种: 定义:将一个复杂的对象分解成多个简单的对象来进行构建,将复杂的构建层与表现层分离,使相同的构建过程可以创建不同的表示模式:    优点: ...

  8. C# 8 的模式匹配

    C# 7 里面的Pattern Mathing is 模式 switch 和 when C# 8 里面的Pattern Matching 使用Deconstructor 和 位置匹配模式 下面两个类T ...

  9. 非后端开发Mysql日常使用小结

    数据库的五个概念 数据库服务器 数据库 数据表 数据字段 数据行 那么这里下面既是对上面几个概念进行基本的日常操作. 数据库引擎使用 这里仅仅只介绍常用的两种引擎,而InnoDB是从MySQL 5.6 ...

  10. display:box和display:flex属性介绍

    1.display:box 父容器里面的box属性有box-orient|box-dirextion|box-align|box-pack|box-lines box-orient:用来确定父容器里面 ...