要求:只能输入数字和小数点,可以设置最大值,最小值,小数点前长度,小数点后长度(支持绑定设置): 代码如下: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Input
public MainWindow() { InitializeComponent(); Run run = new Run("This is my text"); run.Foreground = new SolidColorBrush(Colors.Red); // My Color Paragraph paragraph = new Paragraph(); paragraph.Inlines.Add(run); run = new Run() { Text = "Th