摘要: 问题:动态创建控件,绑定了一个Style, 但是无法得到Style中Controltemplate的控件。解决: GroupBox gb = new GroupBox(); gb.Name = "groupbox1"; gb.Header = "MyTest1"; gb.Height = 50; gb.Width = 100; // 使用FindResource, 然后Apply gb.Style = this.FindResource("MyGroupBoxWithIcon") as Style; gb.ApplyTemplate( 阅读全文
posted @ 2012-07-10 14:49 太古月石 阅读(6219) 评论(0) 推荐(3) 编辑