2012-01-19 53 views

回答

3

這是TextBlock的attached property,你必須在C#代碼中使用,在評論下面的代碼:

ComboBox cmb = new ComboBox(); 
cmb.Name = "comboBox1"; 
cmb.IsEditable = true; 
cmb.Text = "Test"; 
TextBlock.SetTextAlignment(cmb, TextAlignment.Right); //here it is