[UWP]文本框。 [英] [UWP]textbox .
本文介绍了[UWP]文本框。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
推荐答案
我对你的问题感到困惑?你的意思是你想为TextBox定义一个构造方法吗?该参数可以用于文本或其他东西吗?
I'm confused about your question? Do you mean you want to define a construct method for TextBox? The parameter could be use for text or some thing else?
如果是这样,您可以创建自己的自定义TextBox类,该类继承自TextBox类。然后根据需要定义构造方法。
If so, you could create your own customized TextBox class that inherited from the TextBox class. Then define the construct method as you want.
例如:
public class MyTextBox : TextBox
{
public MyTextBox( string text)
{
DefaultStyleKey = typeof(TextBox);
this.Text = text;
}
}
如果我误解你,请指出这一点。
If I misunderstand you, please point out about that.
祝你好运,
Roy
这篇关于[UWP]文本框。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文