简体   繁体   English

WPF C#如何在ced后面使textbox.text加粗?

[英]WPF C# How to make textbox.text bold in ced behind?

How to make "textboxUsername.text" text bold in this example? 在此示例中,如何使“ textboxUsername.text”文本变为粗体?

MessageBox.Show("Username " + textBoxUsername.Text + " already exists! Please choose another one.", "Message");

Thanks. 谢谢。

This is no possible, as the MessageBox API exposes to text-formatting options. 这是不可能的,因为MessageBox API公开了文本格式选项。

The best way is to create your own form and make it look like a message box (this isn't so hard, it's just a modal dialog with a button on it). 最好的方法是创建自己的表单并使它看起来像一个消息框(这并不难,它只是一个带有按钮的模式对话框)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM