publicclassmyUI:StackPanel{privateTextBoxtext=newTextBox();publicstringMyProperty{get;set;}publicmyUI(){text.Text=MyProperty;this.Children.Add(text);}}例如上面,当我在设计... public class myUI : StackPanel
{
private TextBox text=new TextBox();

public string MyProperty { get ; set; }

public myUI()
{

text.Text = MyProperty;
this.Children.Add(text);
}
}

例如上面,当我在设计器里加入<local:myUI MyProperty ="dd"/> 设计器什么都不显示,为什么,求教。